diff --git a/crates/app/storyteller-vc/Cargo.lock b/crates/app/storyteller-vc/Cargo.lock index 3043d05302..ced1aea4c9 100644 --- a/crates/app/storyteller-vc/Cargo.lock +++ b/crates/app/storyteller-vc/Cargo.lock @@ -326,6 +326,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen", +] + [[package]] name = "copyless" version = "0.1.5" @@ -454,6 +464,7 @@ dependencies = [ "parking_lot", "stdweb", "thiserror", + "wasm-bindgen", "web-sys", "winapi", ] @@ -1867,9 +1878,12 @@ checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" name = "storyteller-vc" version = "0.1.0" dependencies = [ + "console_error_panic_hook", "cpal", "iced", "ringbuf", + "wasm-bindgen", + "web-sys", ] [[package]] diff --git a/crates/app/storyteller-vc/Cargo.toml b/crates/app/storyteller-vc/Cargo.toml index 772fce10e1..bb723a4107 100644 --- a/crates/app/storyteller-vc/Cargo.toml +++ b/crates/app/storyteller-vc/Cargo.toml @@ -6,8 +6,18 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cpal = "0.13.5" iced = "0.4.2" ringbuf = "0.2.8" +[target.'cfg(target_arch = "wasm32")'.dependencies] +cpal = { version = "0.13.5", features=["wasm-bindgen"] } +wasm-bindgen = "0.2.45" +web-sys = { version = "0.3.22", features=["console"] } +console_error_panic_hook = "0.1.5" + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +cpal = "0.13.5" + + + [workspace]