-
Is there any facility for building wasm binaries within Over at PRQL/prql#2881 we're hoping to use a We were planning to use https://crates.io/crates/substrate-wasm-builder. That seems to allow building from I also found https://github.com/rustminded/xtask-wasm/blob/main/src/dist.rs which also looks interesting, but doesn't seem to support building from (I also posted this at rustwasm/wasm-pack#916, so feel free to close if that's a better place for it) Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You probably mean how to run This is indeed possible with |
Beta Was this translation helpful? Give feedback.
That is the desired goal ofc, unfortunately this requires a dedicated target in Rust, which doesn't currently exist. Something like
wasm32-web
. I'm not entirely sure what you intend to do btw, but you can't build the JS shim frombuild.rs
for that same project.The current flow looks like this:
Rust runs your
build.rs
-> then it compiles your crate -> produces a.wasm
file -> you run it throughwasm-bindgen-cli
.You can't let your
build.rs
generate the JS shim and fix you.wasm
file because it runs before compiling the crate in the first place.Wha…