From 4f1394f2c8659753fdbb14dbf55a4e0c8c8ea9bb Mon Sep 17 00:00:00 2001 From: Tei Leelo Roberts Date: Fri, 25 Aug 2023 16:18:56 +0200 Subject: [PATCH] fix(web): semantic packages --- crates/network/src/diff_serialization.rs | 4 +++- web/Cargo.lock | 1 + web/Cargo.toml | 1 + web/client/Cargo.toml | 1 + web/client/src/lib.rs | 1 + web/www/src/main.ts | 2 +- 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/network/src/diff_serialization.rs b/crates/network/src/diff_serialization.rs index 189d03c7e6..95a05a909b 100644 --- a/crates/network/src/diff_serialization.rs +++ b/crates/network/src/diff_serialization.rs @@ -547,7 +547,9 @@ impl<'a, 'de> serde::de::Visitor<'de> for NetworkedComponentDescVisitor<'a> { let component = with_component_registry(|r| r.get_by_path(path)); match component { Some(desc) => Ok(desc), - None => Err(serde::de::Error::custom(format!("No such component: {v}"))), + None => Err(serde::de::Error::custom(format!( + "Encountered unknown networked component: {v} {path:?}" + ))), } } None => Err(serde::de::Error::custom(format!( diff --git a/web/Cargo.lock b/web/Cargo.lock index 0e929afb4a..ec2f355c10 100644 --- a/web/Cargo.lock +++ b/web/Cargo.lock @@ -1075,6 +1075,7 @@ dependencies = [ "ambient_layout", "ambient_native_std", "ambient_network", + "ambient_package_semantic_native", "ambient_primitives", "ambient_renderer", "ambient_rpc", diff --git a/web/Cargo.toml b/web/Cargo.toml index f576fa0cf4..926a627bdc 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -30,6 +30,7 @@ ambient_ecs_editor = { path = "../crates/ecs_editor" } ambient_debugger = { path = "../crates/debugger" } ambient_primitives = { path = "../crates/primitives" } ambient_client_shared = { path = "../crates/client_shared/" } +ambient_package_semantic_native = { path = "../crates/package_semantic_native/" } url = "2.3" anyhow = "1.0" diff --git a/web/client/Cargo.toml b/web/client/Cargo.toml index 1addf21a98..26ab7c6896 100644 --- a/web/client/Cargo.toml +++ b/web/client/Cargo.toml @@ -33,6 +33,7 @@ ambient_layout = { workspace = true } ambient_debugger = { workspace = true } ambient_primitives = { workspace = true } ambient_client_shared = { workspace = true } +ambient_package_semantic_native = { workspace = true } url = { workspace = true } anyhow = { workspace = true } diff --git a/web/client/src/lib.rs b/web/client/src/lib.rs index e19e0880ed..9a9fea4fc6 100644 --- a/web/client/src/lib.rs +++ b/web/client/src/lib.rs @@ -36,6 +36,7 @@ pub fn init_ambient(logging: bool, panic: bool) { ambient_world_audio::init_components(); ambient_wasm::shared::init_all_components(); ambient_primitives::init_components(); + ambient_package_semantic_native::init_components(); } #[wasm_bindgen] diff --git a/web/www/src/main.ts b/web/www/src/main.ts index 73e30e88bf..07c108b25f 100644 --- a/web/www/src/main.ts +++ b/web/www/src/main.ts @@ -91,6 +91,6 @@ import("ambient_web") return; } - ambient.start(target, "https://api.ambient.run/servers/ensure-running?package_id=ambient_example_asset_loading"); + ambient.start(target, "https://127.0.0.1:9000"); // setupAudio(); });