Skip to content

Commit 367c979

Browse files
dylanpleckibillf
authored andcommitted
Fix integration test failures
First, improve error output by adding descriptive messages to snafu error types. Second, add the ability to call the WASM guest application in the runner via the set_name and hello entrypoint functions. Then, fix the following bugs: - Only wrap (trampoline) instance-type exports, other types are exported with similar names. - Find exports in the "front instance" using an interface name lookup, then function lookup (previously: only func name). - Run post_return methods on WASM func calls after exit from trampoline, otherwise the same instance cannot be used again.
1 parent 06c0a39 commit 367c979

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ anyhow = "1"
3030
derivative = "2"
3131
semver = "1"
3232
wasmtime = { version = "33", features = ["component-model"] }
33-
wit-bindgen = "0.42"
33+
wit-bindgen = { version = "0.42", default-features = false, features = [
34+
"macros",
35+
]}
3436

3537
[target.'cfg(unix)'.dependencies]
3638
anyhow.workspace = true

tests/wasm/application/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@ edition.workspace = true
66
[lib]
77
crate-type = ["cdylib"]
88

9+
[features]
10+
default = [
11+
"async"
12+
]
13+
async = [
14+
"wit-bindgen/async",
15+
]
16+
917
[dependencies]
1018
wit-bindgen.workspace = true

tests/wasm/kvstore/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@ edition.workspace = true
66
[lib]
77
crate-type = ["cdylib"]
88

9+
[features]
10+
default = [
11+
"async"
12+
]
13+
async = [
14+
"wit-bindgen/async",
15+
]
16+
917
[dependencies]
1018
wit-bindgen.workspace = true

tests/wasm/logger/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@ edition.workspace = true
66
[lib]
77
crate-type = ["cdylib"]
88

9+
[features]
10+
default = [
11+
"async"
12+
]
13+
async = [
14+
"wit-bindgen/async",
15+
]
16+
917
[dependencies]
1018
wit-bindgen.workspace = true

0 commit comments

Comments
 (0)