Skip to content

Add support for Emscripten v4.0.12 to v6.0.11 - #5610

Open
madsmtm wants to merge 3 commits into
rust-lang:mainfrom
madsmtm:update-emsdk
Open

madsmtm wants to merge 3 commits into
rust-lang:mainfrom
madsmtm:update-emsdk

Conversation

@madsmtm

@madsmtm madsmtm commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Update for ABI-breaking changes to Emscripten.

See also this Zulip discussion on how to handle these in general.

CC target maintainers @hoodmane @juntyr

See also last update: #3962

@madsmtm madsmtm changed the title Add support for Emscripten / emsdk to v6.0.11 Add support for Emscripten v6.0.11 Oct 5, 2026
Comment thread ci/emscripten.sh
# Note: keep in sync with:
# https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-unknown-emscripten.md#requirements
emsdk_version=3.1.68
emsdk_version=6.0.11

@madsmtm madsmtm Oct 5, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should test a range of emscripten versions, though I'm unsure how we'd go about doing that?

WDYT @tgross35?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wouldn't hurt but I also wouldn't prioritize it, hopefully any ABI breaks continue to be small.

Comment thread build.rs
// Non-Emscripten or version >= 3.1.42.
_ => (),
if let Some(v) = emcc_version_code() {
// 3.1.42

@hoodmane hoodmane Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum supported version is 4.0.0 so let's drop this.

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But minimum supported version is only very recently v4.0.0, whereas libc can still be used with lower MSRV?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not much code to keep so if there's a reason then it's probably fine.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's pretty small so we may as well keep it around for now. Could we document the versions we support at https://doc.rust-lang.org/beta/rustc/platform-support/wasm32-unknown-emscripten.html?

@madsmtm madsmtm Oct 10, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh why do I always wind up on the beta version of those pages, thanks for the link

@madsmtm madsmtm added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Oct 5, 2026
@madsmtm madsmtm changed the title Add support for Emscripten v6.0.11 Add support for Emscripten v4.0.12 to v6.0.11 Oct 5, 2026

@tgross35 tgross35 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit then LGTM with @hoodmane's approval

View changes since this review

Comment on lines +31 to 40
// `fsblkcnt_t` and `fsfilcnt_t` are 64-bit since v4.0.12, see:
// https://github.com/emscripten-core/emscripten/pull/24769
#[cfg(not(emscripten_fsblkcnt_is_32bit))]
pub type fsblkcnt_t = u64;
#[cfg(emscripten_fsblkcnt_is_32bit)]
pub type fsblkcnt_t = u32;
#[cfg(not(emscripten_fsblkcnt_is_32bit))]
pub type fsfilcnt_t = u64;
#[cfg(emscripten_fsblkcnt_is_32bit)]
pub type fsfilcnt_t = u32;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are repeated, can you cfg_if! them?

Comment thread ci/emscripten.sh
# Note: keep in sync with:
# https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/wasm32-unknown-emscripten.md#requirements
emsdk_version=3.1.68
emsdk_version=6.0.11

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wouldn't hurt but I also wouldn't prioritize it, hopefully any ABI breaks continue to be small.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items O-linux O-linux-like O-unix S-waiting-on-maintainer S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants