-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for wasm32-unknown-emscripten
target
#974
Conversation
✅ Deploy Preview for maturin-guide ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
fb7e327
to
26a029b
Compare
.github/workflows/test.yml
Outdated
run: | | ||
set -ex | ||
cargo run build -m test-crates/pyo3-mixed/Cargo.toml -o dist --target wasm32-unknown-emscripten -i python3.11 | ||
# TODO: Install Pyodide and run tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make at least an alpha release of Pyodide since installing the development version is a bit inconvenient. It's also been longer than normal since we made a release.
50374b7
to
510dba8
Compare
src/compile.rs
Outdated
@@ -214,6 +218,22 @@ fn compile_target( | |||
]; | |||
rustc_args.extend(mac_args); | |||
} | |||
} else if target.is_emscripten() { | |||
shared_args.push("-Zbuild-std"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully rust-lang/rust#98149 will be merged soon and we won't have to use this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When that happens we can also remove -Crelocation_model=pic
.
Thanks for working on this @messense! |
Thanks for the review and your work on |
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
TODO:
The workaround was removed in Emscripten: Use -Z link-native-libraries=no and remove emcc wrapper #978
Part of #904