-
Notifications
You must be signed in to change notification settings - Fork 44
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 docs on working with this crate in WebAssembly #176
Comments
It's exactly what I'm trying to do ! I'm creating a web app to compress images to jpeg and I want to bundle them in a zip folder to be able to download them. How could I do it ? |
I just found someone who tried to do something similar: https://github.com/Janlaywss/rust-zip-wasm/blob/main/src/lib.rs |
@rambip I hope you already tried to build |
For Rust projects targeting Wasm, this library can be used as normal. You can run cargo check --target wasm32-unknown-unknown --no-default-features to make sure it's compatible with that target. Testing in that environment is a bit more involved, but only required if you really have platform-specific If you'd like to publish this library as stand-alone npm package (for use from JS), that's more involved and would require wrapping it appropriately. The |
Here is the project I compiled zip to wasm: To compile it you just need trunk |
Implement `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Hash` and `Display` for `DateTime`
It is possible to use this crate in WebAssembly though one needs to turn off the default features since they link to some C libraries. We should document this.
The text was updated successfully, but these errors were encountered: