wgpu
wgpu copied to clipboard
wasm-pack test broken
Description
The recommended command-line to run tests with WebGL fails to parse the top-level Cargo.toml file:
~/src/wgpu% wasm-pack test --headless --chrome --no-default-features --features webgl --workspace
Error: failed to parse manifest: /home/bernie/src/wgpu/Cargo.toml
Caused by: failed to parse manifest: /home/bernie/src/wgpu/Cargo.toml
Caused by: TOML parse error at line 1, column 1
1 | [workspace]
| ^ missing field `package`
Platform
- webgpu trunk as of Jun 11 2024
- wasm-pack 0.12.1
- cargo 1.76.0 (c84b36747 2024-01-18)
You need cd into any crate first. wasm-pack test can't deal with a virtual workspace.
We should better document this.
You need
cdinto any crate first.
Tiny nitpick: cd isn't strictly necessary; you can also do wasm-pack test <flags> some-package-directory/.
On my side, wasm-pack headless test cannot succeed to request adapter, while in browser it fails to compute on gpu with a BufferAsyncError