Skip to content

Commit

Permalink
Ensure Rust libc is ABI-compatible with Emscripten >= 3.1.42
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Jun 25, 2023
1 parent 6fc3831 commit fa821ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Expand Up @@ -38,8 +38,6 @@ RUN \
# Emscripten patches
RUN \
curl -Ls https://github.com/emscripten-core/emscripten/compare/3.1.42...kleisauke:wasm-vips-3.1.42.patch | patch -p1 -d $EMSDK/upstream/emscripten && \
# https://github.com/emscripten-core/emscripten/pull/19569#issuecomment-1605440414
curl -Ls https://github.com/emscripten-core/emscripten/commit/b182182747e8a5525ff3282953fb814c8c0c9266.patch | patch -R -p1 -d $EMSDK/upstream/emscripten && \
emcc --clear-cache && embuilder build sysroot --force

# Rust
Expand All @@ -50,3 +48,7 @@ RUN \
--target wasm32-unknown-emscripten \
--default-toolchain nightly-2023-06-24 \
--component rust-src

# https://github.com/rust-lang/libc/pull/3282
RUN \
sed -i 's|version = "0.2.146"|git = "https://github.com/kleisauke/libc", branch = "emscripten-new-stat"|' $(rustc --print sysroot)/lib/rustlib/src/rust/library/std/Cargo.toml

0 comments on commit fa821ec

Please sign in to comment.