diff --git a/Cargo.toml b/Cargo.toml index 0a6a43fadd64..cec611ee9bb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,11 +25,16 @@ debug = true [patch.crates-io] # 2022-10-02 - crate update -eframe = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } -egui = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } -egui_extras = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } -egui_glow = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } -egui-wgpu = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +#eframe = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +#egui = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +#egui_extras = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +#egui_glow = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +#egui-wgpu = { git = "https://github.com/emilk/egui", rev = "77df8ca0b0a949a713a9331b7c066df775aa6582" } +eframe = { path = "../egui/crates/eframe" } +egui = { path = "../egui/crates/egui" } +egui_extras = { path = "../egui/crates/egui_extras" } +egui_glow = { path = "../egui/crates/egui_glow" } +egui-wgpu = { path = "../egui/crates/egui-wgpu" } # Because gltf hasn't published a new version: https://github.com/gltf-rs/gltf/issues/357 gltf = { git = "https://github.com/rerun-io/gltf", rev = "3c14ded73755d1ce9e47010edb06db63cb7e2cca" } diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index d44746a31871..49145c0e4280 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -91,3 +91,4 @@ puffin_http = { version = "0.10", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.6" tracing-wasm = "0.2" +wasm-bindgen-futures = "0.4" diff --git a/crates/re_viewer/src/web.rs b/crates/re_viewer/src/web.rs index 8f4591855bb5..d2f1f78e0cc6 100644 --- a/crates/re_viewer/src/web.rs +++ b/crates/re_viewer/src/web.rs @@ -7,7 +7,7 @@ use eframe::wasm_bindgen::{self, prelude::*}; /// You can add more callbacks like this if you want to call in to your code. #[cfg(target_arch = "wasm32")] #[wasm_bindgen] -pub fn start(canvas_id: &str) -> std::result::Result<(), eframe::wasm_bindgen::JsValue> { +pub async fn start(canvas_id: &str) -> std::result::Result<(), eframe::wasm_bindgen::JsValue> { // Make sure panics are logged using `console.error`. console_error_panic_hook::set_once(); @@ -29,7 +29,7 @@ pub fn start(canvas_id: &str) -> std::result::Result<(), eframe::wasm_bindgen::J let app = crate::RemoteViewerApp::new(&cc.egui_ctx, cc.storage.as_deref(), url); Box::new(app) }), - )?; + ).await?; Ok(()) } diff --git a/scripts/setup_web.sh b/scripts/setup_web.sh index 71e521c409ea..59b5af0b1c22 100755 --- a/scripts/setup_web.sh +++ b/scripts/setup_web.sh @@ -5,7 +5,7 @@ cd "$script_path/.." # Pre-requisites: rustup target add wasm32-unknown-unknown -cargo install wasm-bindgen-cli --version 0.2.82 +cargo install wasm-bindgen-cli --version 0.2.83 # Required by build_web.sh: packagesNeeded='binaryen jq'