Skip to content

Commit 3db4824

Browse files
committed
fix: correct WIT binding module structure for user service component
Update BUILD.bazel package_name from "user:service" to "example:user-service" to match the WIT file definition. Update Rust imports to use the correct binding path: example::user_service::user_service instead of user::service::user_service. This resolves WIT binding generation mismatches that were causing compilation failures in multi-component system examples.
1 parent 0610548 commit 3db4824

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/cpp_component/multi_component_system/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ wit_library(
2222

2323
wit_library(
2424
name = "user_service_wit",
25-
package_name = "user:service",
25+
package_name = "example:user-service",
2626
srcs = ["wit/user_service.wit"],
2727
world = "user-service",
2828
)

examples/cpp_component/multi_component_system/components/user_service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::collections::HashMap;
33
use uuid::Uuid;
44

55
// Use the generated bindings from rust_wasm_component_bindgen
6-
use user_service_bindings::exports::user::service::user_service::Guest;
6+
use user_service_bindings::exports::example::user_service::user_service::Guest;
77

88
// Re-export the generated WIT types
9-
pub use user_service_bindings::exports::user::service::user_service::*;
9+
pub use user_service_bindings::exports::example::user_service::user_service::*;
1010

1111
/// Rust User Service Component
1212
///

0 commit comments

Comments
 (0)