From 3d5c835ad965db6fc4a119d917d4bf0050b0082a Mon Sep 17 00:00:00 2001 From: Tomas Olvecky Date: Thu, 31 Oct 2024 21:38:51 +0100 Subject: [PATCH] fix: Fix `bindgen!` macro use for v26.0 Broken by https://github.com/bytecodealliance/wasmtime/pull/9288 --- crates/wasm-workers/src/component_logger.rs | 7 ++++++- crates/wasm-workers/src/host_exports.rs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/wasm-workers/src/component_logger.rs b/crates/wasm-workers/src/component_logger.rs index 262055cb..83dcf8cd 100644 --- a/crates/wasm-workers/src/component_logger.rs +++ b/crates/wasm-workers/src/component_logger.rs @@ -32,8 +32,13 @@ pub(crate) mod log_activities { // Generate `obelisk::log::log` wasmtime::component::bindgen!({ path: "host-wit/", + // interfaces: "import obelisk:log/log;", // Broken in 26.0.0 + inline: "package any:any; + world bindings { + import obelisk:log/log; + }", + world: "any:any/bindings", async: false, - interfaces: "import obelisk:log/log;", trappable_imports: false, }); } diff --git a/crates/wasm-workers/src/host_exports.rs b/crates/wasm-workers/src/host_exports.rs index ba8c5a11..ccd108f2 100644 --- a/crates/wasm-workers/src/host_exports.rs +++ b/crates/wasm-workers/src/host_exports.rs @@ -2,7 +2,12 @@ wasmtime::component::bindgen!({ path: "host-wit/", async: true, - interfaces: "import obelisk:workflow/host-activities;", + // interfaces: "import obelisk:workflow/host-activities;", // Broken in 26.0.0 + inline: "package any:any; + world bindings { + import obelisk:workflow/host-activities; + }", + world: "any:any/bindings", trappable_imports: true, with: { "obelisk:types/execution/join-set-id": concepts::prefixed_ulid::JoinSetId,