The entire runtime API/ABI for Firefox OS is HTML5, so technically
JavaScript is all you get. :)

It's possible however to compile other languages to JavaScript -- for
instance C and C++ programs using the emscripten compiler <
http://emscripten.org/>. Emscripten's output uses the 'asm.js' subset of
JavaScript which Firefox optimizes particularly well in recent versions.

Non-C/C++ languages that produce LLVM bitcode directly may also work with
emscripten, as do languages like Lua that have a C-based runtime and don't
require fancy JIT compilation tricks. However an interpreter running in the
JavaScript VM may incur some overhead, so watch those constraints...

(One of emscripten's main targets is C/C++/OpenGL game engines, which tend
to be compiled to native code for iOS, Android, Windows, etc.)

-- brion vibber (brion @ pobox.com / bvibber @ wikimedia.org)


On Wed, Apr 9, 2014 at 10:47 AM, Bob Thulfram <[email protected]> wrote:

> I've just been using JavaScript with Firefox OS but I recently saw a
> book on Web Frameworks from Pragmatic called Seven Web Frameworks in
> Seven Weeks: Adventures in Better Web Apps.
> http://pragprog.com/book/7web/seven-web-frameworks-in-seven-weeks
>
> This book covers Ruby, JavaScript, Erlang, Haskell, and Clojure. Has
> anyone run any other languages except JavaScript on Firefox OS. jQuery
> isn't a language but I don't like using it on Firefox OS for memory
> reasons. Ruby in particular interests me, but I'm not doing any
> programming that isn't on Firefox OS (call me a bigot).
>
> If we're going to have a $25 phone with 256MB RAM, we don't have
> extra? Or do we? I'm having fun with these constraints, having started
> serious computing with 256 bytes (not MB) of RAM (ELF II).
>
> So any other languages for Firefox OS except JavaScript? Possible if
> not desireable?
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
>
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to