Skip to content
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

Merged
merged 2 commits into from
Jun 19, 2022

Conversation

messense
Copy link
Member

@messense messense commented Jun 19, 2022

@netlify
Copy link

netlify bot commented Jun 19, 2022

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 39edc53
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/62af0897552dbf0008d0dfcc
😎 Deploy Preview https://deploy-preview-974--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

src/target.rs Outdated Show resolved Hide resolved
@messense messense force-pushed the emscripten branch 5 times, most recently from fb7e327 to 26a029b Compare June 19, 2022 05:13
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
Copy link
Contributor

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.

@messense messense force-pushed the emscripten branch 2 times, most recently from 50374b7 to 510dba8 Compare June 19, 2022 06:04
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");
Copy link
Contributor

@hoodmane hoodmane Jun 19, 2022

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.

Copy link
Contributor

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.

src/compile.rs Outdated Show resolved Hide resolved
@hoodmane
Copy link
Contributor

Thanks for working on this @messense!

@messense
Copy link
Member Author

Thanks for the review and your work on pyo3 and setuptools-rust @hoodmane !

@messense messense marked this pull request as ready for review June 19, 2022 06:21
@messense messense enabled auto-merge June 19, 2022 11:36
@messense messense merged commit 40ae243 into PyO3:main Jun 19, 2022
@messense messense deleted the emscripten branch June 19, 2022 11:51
@messense messense linked an issue Jun 19, 2022 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for wasm32-unknown-emscripten
2 participants