Skip to content

Make Rust work with emscripten #604

Closed
@steveklabnik

Description

@steveklabnik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-dev-toolsRelevant to the development tools team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions