Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the beginning of PRQL#1836, replacing `wasm-pack` with https://crates.io/crates/substrate-wasm-builder. `wasm-pack` has been the source of lots of issues, makes builds slower -- in particular small code changes cause a very long iteration cycle in playground builds -- and is no longer maintanied. It's a bit harder than I thought: - We need to create the paths `bundler`, `node`, `web` paths ourselves, replacing [these lines](https://github.com/PRQL/prql/blob/5db61f45ad31ff5673fdfb7890cc3699d47940f9/bindings/prql-js/package.json#L20-L21), by calling `wasm-bindgen debug/wbuild/prql-js/prql_js.wasm --target=...`. - We probably need some way of getting the `.wasm` file location, by reading `include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));` for the `WASM_BINARY` or `WASM_BINARY_BLOATY` constants. Ideally we'd do this at build time, all in the `build.rs` script; I'm not sure whether that's possible though. - Possibly I'm figuring too much of this out on my own and it's done elsewhere? The precedent for this approach seems to be blockchain rather than JS applications...
- Loading branch information