Description
Issue by brson
Wednesday Apr 18, 2012 at 20:44 GMT
For earlier discussion, see rust-lang/rust#2235
This issue was labelled with: A-an-interesting-project, A-build, A-runtime, E-hard, I-wishlist in the Rust repository
I've spent some time poking at this problem and rustc now generates code that emscripten can translate, but the compiled javascript fails when it hits a runtime function. The next step is to start building the runtime using emcc
as the compiler. Stub out all the things that don't build behind EMSCRIPTEN
ifdefs.
Emscripten is adding a way to treat inline assembly as javascript, so all the parts of the runtime that don't build with emscripten can be implemented inline with javascript.
Alternately, we could reimplement the runtime piecemeal in javascript and not bother compiling it from C++ at all. This approach isn't recommended.