Skip to content

Conversation

cwfitzgerald
Copy link
Member

Motivated by enabling wasm32v1-none which requires higher than 1.83, but I realized that updating would be fairly easy.

@cwfitzgerald cwfitzgerald marked this pull request as ready for review February 24, 2025 22:38
@cwfitzgerald cwfitzgerald requested a review from a team as a code owner February 24, 2025 22:38
@cwfitzgerald cwfitzgerald changed the title Move REPO_MSRV to 1.85 Update REPO_MSRV to 1.85 Feb 25, 2025
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
# Added by xshell
'cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)',
Copy link
Member

Choose a reason for hiding this comment

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

question: wat is this

I see https://github.com/matklad/xshell/blob/52f71bac326aaac291d07146ea790ad886dd8131/src/lib.rs#L342 with the same wording, but that doesn't seem to actually be a cfg.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ErichDonGubler ErichDonGubler self-assigned this Feb 25, 2025
@ErichDonGubler ErichDonGubler added the area: infrastructure Testing, building, coordinating issues label Feb 25, 2025
@cwfitzgerald cwfitzgerald merged commit 8fb09a5 into gfx-rs:trunk Feb 25, 2025
36 checks passed
@cwfitzgerald cwfitzgerald deleted the cw/repo-msrv-1.85 branch February 25, 2025 04:39
@LegNeato
Copy link
Contributor

FWIW this breaks rust-gpu as we are on nightly-2024-11-22 (~1.84) and it is a ton of work to port forward on our end (Rust-GPU/rust-gpu#182). I will file a new issue.

emilk pushed a commit to emilk/egui that referenced this pull request Apr 24, 2025
Prerequisite of #6744.
See: gfx-rs/wgpu#7218,
gfx-rs/wgpu#7425

Please be aware that Rust 1.84 enables some (more) WASM extensions by
default, and ships with an `std` built with them enabled:
https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features/
According to `rustc +1.84 --print=cfg --target wasm32-unknown-unknown`,
these are: `multivalue`, `mutable-globals`, `reference-types`, and
`sign-ext`.
(c.f. `rustc +1.84 --print=cfg --target wasm32-unknown-unknown -C
target-cpu=mvp` enabling none.)
For reference: https://webassembly.org/features/

----

If support is desired for ancient/esoteric browsers that don't have
these implemented, there are two ways to get around this:
- Target `wasm32v1-none` instead, but that's a `no-std` target, and I
suppose a lot of dependencies don't work that way (e.g.
gfx-rs/wgpu#6826)
- Using the `-Ctarget-cpu=mvp` and `-Zbuild-std=panic_abort,std` flags,
and the `RUSTC_BOOTSTRAP=1` escape hatch to allow using the latter with
non-`nightly` toolchains - until
https://github.com/rust-lang/wg-cargo-std-aware is stabilized. (For
reference:
https://github.com/ruffle-rs/ruffle/pull/18528/files#diff-fb2896d189d77b35ace9a079c1ba9b55777d16e0f11ce79f776475a451b1825a)

I don't think either of these is particularly advantageous, so I suggest
just accepting that browsers will have to have some extensions
implemented to run `egui`.
darkwater pushed a commit to darkwater/egui that referenced this pull request Aug 24, 2025
Prerequisite of emilk#6744.
See: gfx-rs/wgpu#7218,
gfx-rs/wgpu#7425

Please be aware that Rust 1.84 enables some (more) WASM extensions by
default, and ships with an `std` built with them enabled:
https://blog.rust-lang.org/2024/09/24/webassembly-targets-change-in-default-target-features/
According to `rustc +1.84 --print=cfg --target wasm32-unknown-unknown`,
these are: `multivalue`, `mutable-globals`, `reference-types`, and
`sign-ext`.
(c.f. `rustc +1.84 --print=cfg --target wasm32-unknown-unknown -C
target-cpu=mvp` enabling none.)
For reference: https://webassembly.org/features/

----

If support is desired for ancient/esoteric browsers that don't have
these implemented, there are two ways to get around this:
- Target `wasm32v1-none` instead, but that's a `no-std` target, and I
suppose a lot of dependencies don't work that way (e.g.
gfx-rs/wgpu#6826)
- Using the `-Ctarget-cpu=mvp` and `-Zbuild-std=panic_abort,std` flags,
and the `RUSTC_BOOTSTRAP=1` escape hatch to allow using the latter with
non-`nightly` toolchains - until
https://github.com/rust-lang/wg-cargo-std-aware is stabilized. (For
reference:
https://github.com/ruffle-rs/ruffle/pull/18528/files#diff-fb2896d189d77b35ace9a079c1ba9b55777d16e0f11ce79f776475a451b1825a)

I don't think either of these is particularly advantageous, so I suggest
just accepting that browsers will have to have some extensions
implemented to run `egui`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: infrastructure Testing, building, coordinating issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants