Repository navigation
Adjust proxy_wasm::main macro for changes in Rust v1.100. - #389
Draft
PiotrSikora wants to merge 3 commits into
Draft
PiotrSikora wants to merge 3 commits into
PiotrSikora wants to merge 3 commits into
Conversation
Since Rust v1.56.0 (2021-10-21), an explicit call to `__wasm_call_ctors` was required to indicate that the Wasm module was a WASI reactor and not a multi-entry WASI command. This changed again in Rust v1.100.0 (2026-11-12), which assumes that all libraries are WASI reactors, so we no longer need an explicit call. See: rust-lang/rust#161421 Reported by Andrew Carlson. Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
PiotrSikora
commented
Nov 18, 2026
| } | ||
|
|
||
| if version_check::is_min_version("1.100.0") == Some(false) { | ||
| println!("cargo:rustc-cfg=wasi_call_ctors"); |
Member
Author
There was a problem hiding this comment.
TODO: add nightly build that first introduced this change.
Note that we didn't catch this issue earlier, because we test only examples with -Z wasi-exec-model=reactor on nightly, so ideally we'd also add examples without that flag.
| } | ||
| } | ||
|
|
||
| if version_check::is_min_version("1.100.0") == Some(false) { |
Member
Author
There was a problem hiding this comment.
NOTE: if we want to avoid extra dependency, then we could parse rustc --version output ourselves.
There was a problem hiding this comment.
Using version_check seems reasonable to me, FWIW.
mpwarres
approved these changes
Nov 18, 2026
| } | ||
| } | ||
|
|
||
| if version_check::is_min_version("1.100.0") == Some(false) { |
There was a problem hiding this comment.
Using version_check seems reasonable to me, FWIW.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Rust v1.56.0 (2021-10-21), an explicit call to
__wasm_call_ctorswas required to indicate that the Wasm module was a WASI reactor and not
a multi-entry WASI command.
This changed again in Rust v1.100.0 (2026-11-12), which assumes that all
libraries are WASI reactors, so we no longer need an explicit call.
See: rust-lang/rust#161421
Reported by Andrew Carlson.