Is it possible to develop Firefox browser extensions without writing JavaScript / TypeScript?

Hello, I was looking at WXT extension framework which supports multiple UI frameworks, but they are all JavaScript frameworks only. Is there any alternative way to write Firefox browser extension in a different language (like Rust / Python / Go, etc.) with minimal or no JavaScript, with a ok developer experience?

Transpilation to JavaScript is fine if it is well supported in Firefox with ok developer experience.

I also checked Dart but its support on Firefox does not seem great, like the extension only works on Chrome browsers.

12 points · 3 comments · view on lemmy.world

3 Comments

Zikeji@programming.dev · 6 pts · 157d (1 reply)

You could write something in rust for WASM and have minimal JavaScript. Looks like there are no frameworks around this concept as far as I'm aware, but I don't see why it wouldn't work in Firefox.

Ephera@lemmy.ml · 5 pts · 157d

Well, you could presumably at least use web-sys for interacting with the DOM and wasm-bindgen in general for generating the boilerplate.

But yeah, there might not be a pre-made library for interacting with the extension API, so might need to write your own JS←→WASM bindings.

e8d79@discuss.tchncs.de · 6 pts · 157d

Yes its kind of possible with F# and Fable. I did it a few years ago. I say kind of because its still transpiling to javascript.