Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 1d10946

Browse files
authored
Agent wrapper WIT generator (#299)
* Removed some debug prints * Agent wrapper WIT generator, WIP * Updated to type name changes * Fix * Final deps * Agent wrapper WIT generator, WIP * Test fixes * Agent wrapper WIT generator
1 parent 8e2c6c5 commit 1d10946

3 files changed

Lines changed: 1038 additions & 7 deletions

File tree

golem-cli/src/model/agent/extraction.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ fn dynamic_import(
197197
// These does not have to be mocked, we allow them through wasmtime-wasi
198198
Ok(())
199199
} else {
200-
println!("dynamic_import: {name}");
201-
202200
let mut instance = root.instance(name)?;
203201
let mut resources: HashMap<(String, String), Vec<MethodInfo>> = HashMap::new();
204202
let mut functions = Vec::new();
@@ -245,8 +243,7 @@ fn dynamic_import(
245243
}
246244
}
247245

248-
for ((interface_name, resource_name), _methods) in resources {
249-
println!("Defining resource: {interface_name}.{resource_name}");
246+
for ((_interface_name, resource_name), _methods) in resources {
250247
instance.resource(
251248
&resource_name,
252249
ResourceType::host::<ResourceEntry>(),
@@ -255,7 +252,6 @@ fn dynamic_import(
255252
}
256253

257254
for function in functions {
258-
println!("Defining function: {}", function.name);
259255
instance.func_new_async(
260256
&function.name.function.function_name(),
261257
move |_store, _params, _results| {

golem-cli/src/model/agent/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
// limitations under the License.
1414

1515
mod conversions;
16-
///^ Golem Agent types
17-
///^ NOTE: this is going to be moved to golem-common
1816
pub mod extraction;
17+
pub mod wit;
18+
19+
// Golem Agent types
20+
// NOTE: this is going to be moved to golem-common
1921

2022
mod bindings {
2123
wasmtime::component::bindgen!({

0 commit comments

Comments
 (0)