pick up wasm dep

This commit is contained in:
Quaternions 2025-01-03 17:46:14 -08:00
parent 3c78d9c94c
commit 86d6f7c6a7
3 changed files with 5 additions and 0 deletions

1
Cargo.lock generated
View File

@ -2240,6 +2240,7 @@ dependencies = [
"strafesnet_deferred_loader", "strafesnet_deferred_loader",
"strafesnet_rbx_loader", "strafesnet_rbx_loader",
"strafesnet_snf", "strafesnet_snf",
"wasm-bindgen-futures",
"wgpu", "wgpu",
"winit", "winit",
] ]

View File

@ -27,5 +27,6 @@ strafesnet_common = { path = "../lib/common", registry = "strafesnet" }
strafesnet_deferred_loader = { path = "../lib/deferred_loader", features = ["legacy"], registry = "strafesnet", optional = true } strafesnet_deferred_loader = { path = "../lib/deferred_loader", features = ["legacy"], registry = "strafesnet", optional = true }
strafesnet_rbx_loader = { path = "../lib/rbx_loader", registry = "strafesnet", optional = true } strafesnet_rbx_loader = { path = "../lib/rbx_loader", registry = "strafesnet", optional = true }
strafesnet_snf = { path = "../lib/snf", registry = "strafesnet", optional = true } strafesnet_snf = { path = "../lib/snf", registry = "strafesnet", optional = true }
wasm-bindgen-futures = "0.4.49"
wgpu = "23.0.1" wgpu = "23.0.1"
winit = "0.30.7" winit = "0.30.7"

View File

@ -14,5 +14,8 @@ mod graphics_worker;
fn main(){ fn main(){
let title=format!("Strafe Client v{}",env!("CARGO_PKG_VERSION")); let title=format!("Strafe Client v{}",env!("CARGO_PKG_VERSION"));
#[cfg(target_arch="wasm32")]
wasm_bindgen_futures::spawn_local(setup::setup_and_start(title));
#[cfg(not(target_arch="wasm32"))]
pollster::block_on(setup::setup_and_start(title)); pollster::block_on(setup::setup_and_start(title));
} }