File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282 components : rustfmt
8383 - name : Run cargo fmt
8484 run : cargo fmt --all -- --check
85+
86+ # Run wasm compile checks to catch web-only type mismatches.
87+ wasm_check :
88+ name : Wasm Compile
89+ runs-on : ubuntu-latest
90+ timeout-minutes : 30
91+ steps :
92+ - name : Checkout sources
93+ uses : actions/checkout@v4
94+ with :
95+ submodules : recursive
96+ - name : Install stable toolchain
97+ uses : dtolnay/rust-toolchain@stable
98+ - name : Check wasm target
99+ run : rustup target add wasm32-unknown-unknown
100+ - name : Run wasm compile checks
101+ run : |
102+ cargo check -p vizmat-core --target wasm32-unknown-unknown --no-default-features
103+ cargo check -p vizmat-app --target wasm32-unknown-unknown --no-default-features
Original file line number Diff line number Diff line change 3030 run : |
3131 curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | bash
3232
33+ - name : Run wasm compile checks
34+ run : |
35+ cargo check -p vizmat-core --target wasm32-unknown-unknown --no-default-features
36+ cargo check -p vizmat-app --target wasm32-unknown-unknown --no-default-features
37+
3338 - name : Build WASM
3439 run : |
3540 if [ "${{ github.ref }}" = "refs/heads/main" ]; then
Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ watch:
6161bench :
6262 cargo bench -p vizmat-core --bench bond_cache
6363
64+ wasm-check :
65+ rustup target add wasm32 -unknown-unknown
66+ cargo check -p vizmat-core --target wasm32 -unknown-unknown --no-default-features
67+ cargo check -p vizmat-app --target wasm32 -unknown-unknown --no-default-features
68+
6469wasm :
6570 rustup target add wasm32 -unknown-unknown --toolchain nightly-aarch64 -apple-darwin
6671 cd vizmat-app && PATH=" $HOME/.cargo/bin:$PATH" NO_COLOR=false trunk serve --port 8082
Original file line number Diff line number Diff line change @@ -97,9 +97,7 @@ pub(crate) fn set_structure_picker_keyboard_active(visible: bool) {
9797 }
9898
9999 #[ cfg( target_arch = "wasm32" ) ]
100- let Some ( window) = window ( ) else {
101- return ;
102- } ;
100+ let window = window ( ) ;
103101
104102 #[ cfg( target_arch = "wasm32" ) ]
105103 let event_name = if visible {
You can’t perform that action at this time.
0 commit comments