Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

5 watching

Forks

Repository files navigation

To build the rust stdlib for Emscripten with emscripten-wasm-eh:

./main.sh <emscripten-version> <rust-version>

<rust-version> can be either a nightly date (YYYY-MM-DD) or a released stable version (X.Y.Z).

Nightly, e.g.:

./main.sh 3.1.74 2025-02-01

Stable, e.g.:

./main.sh 3.1.74 1.85.0

The resulting archive is named emcc-<emscripten-version>_<channel>-<rust-version>.tar.bz2, e.g. emcc-3.1.74_nightly-2025-02-01.tar.bz2 or emcc-3.1.74_stable-1.85.0.tar.bz2.

Why?

There are two other options that would seem better:

  1. -Zbuild-std
  2. Build a custom sysroot with https://github.com/RalfJung/rustc-build-sysroot/ or https://github.com/DianaNites/cargo-sysroot/.

-Zbuild-std doesn't work with panic=abort (rust-lang/cargo#7359) or with cargo freeze. Building a custom sysroot with rustc-build-sysroot or cargo-sysroot works with cargo freeze but has the same problem with panic=abort. Thus, I think the only reasonable way to go is to build the sysroot from the rust source directory.

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages