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
Support deployment to wasm32-unknown-unknown without wasm-bindgen #4320
Comments
We'd better to add "wasm-bindgen" feature and disable them without the features. |
Any update on this? It's difficult for us to update to the latest RustPython because we have to track down all of the wasm-bindgen dependencies and manually turn them off. |
We're going to attempt a PR for this |
wasm32-unknown-unknown != wasm-bindgen support.
This is one of the main problems we have with RustPython, as the environment we are deploying to is a non-browser strict wasm32-unknown-unknown environment without wasm-bindgen support.
RustPython by default expects wasm32-unknown-unknown to support wasm-bindgen, thus in our fork of RustPython we have to make the following changes that can be seen in this pull request: https://github.com/demergent-labs/RustPython/pull/1/files
1
In
vm/Cargo.toml
:We need to change this:
To this:
The
js
feature assumes wasm-bindgen support.2
In
vm/Cargo.toml
:We need to change this:
To this, or to a newer version without the
wasmbind
feature:3
In
vm/Cargo.toml
we need to comment out the following:4
In
vm/src/stdlib/time.rs
we need to comment out everything from line 94-102, basically get rid of all of thewasm_bindgen
stuff. We also need a way to provide our own time functionality, which comes from a crate calledic_cdk
, which has an APIic_cdk::api::time
that will give us system time for our environment.5
In
vm/src/vm/vm_object
we need to comment out allwasm_bindgen
functionality, from lines 45-55.Assuming
wasm-bindgen
support requires us to maintain a fork with these many changes, it would be great to upstream the ability to turn off wasm-bindgen so that our fork can be much smaller or even disappear.Thanks!
The text was updated successfully, but these errors were encountered: