Skip to content

Commit 483f92e

Browse files
authored
Update to Wasmtime 7 (#543)
* Update to Wasmtime 7 * Fix trait names for 7.0.0
1 parent 80d9ffa commit 483f92e

File tree

12 files changed

+90
-115
lines changed

12 files changed

+90
-115
lines changed

Cargo.lock

Lines changed: 79 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ go = ['dep:wit-bindgen-go']
7171

7272
[dev-dependencies]
7373
heck = { workspace = true }
74-
wasmtime = { version = "6", features = ['component-model'] }
74+
wasmtime = { version = "7", features = ['component-model'] }
7575
test-artifacts = { path = 'crates/test-rust-wasm/artifacts' }
7676
wit-parser = { workspace = true }

tests/runtime/flavorful.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub struct MyImports {
99
errored: bool,
1010
}
1111

12-
impl imports::Imports for MyImports {
12+
impl imports::Host for MyImports {
1313
fn f_list_in_record1(&mut self, ty: imports::ListInRecord1Result) -> Result<()> {
1414
assert_eq!(ty.a, "list_in_record1");
1515
Ok(())

tests/runtime/lists.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use imports::*;
88
#[derive(Default)]
99
pub struct MyImports;
1010

11-
impl Imports for MyImports {
11+
impl Host for MyImports {
1212
fn empty_list_param(&mut self, a: Vec<u8>) -> Result<()> {
1313
assert_eq!(a, []);
1414
Ok(())

tests/runtime/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ wasmtime::component::bindgen!("testwasi" in "crates/wasi_snapshot_preview1/wit")
2424
#[derive(Default)]
2525
struct Wasi<T>(T);
2626

27-
impl<T> testwasi::Testwasi for Wasi<T> {
27+
impl<T> testwasi::Host for Wasi<T> {
2828
fn log(&mut self, bytes: Vec<u8>) -> Result<()> {
2929
std::io::stdout().write_all(&bytes)?;
3030
Ok(())

tests/runtime/many_arguments.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ wasmtime::component::bindgen!("world" in "tests/runtime/many_arguments");
66
#[derive(Default)]
77
pub struct MyImports {}
88

9-
impl imports::Imports for MyImports {
9+
impl imports::Host for MyImports {
1010
fn many_arguments(
1111
&mut self,
1212
a1: u64,

tests/runtime/numbers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct MyImports {
88
scalar: u32,
99
}
1010

11-
impl imports::Imports for MyImports {
11+
impl imports::Host for MyImports {
1212
fn roundtrip_u8(&mut self, val: u8) -> Result<u8> {
1313
Ok(val)
1414
}

tests/runtime/records.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ wasmtime::component::bindgen!("world" in "tests/runtime/records");
66
#[derive(Default)]
77
pub struct MyImports;
88

9-
impl imports::Imports for MyImports {
9+
impl imports::Host for MyImports {
1010
fn multiple_results(&mut self) -> Result<(u8, u16)> {
1111
Ok((4, 5))
1212
}

tests/runtime/smoke.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub struct MyImports {
88
hit: bool,
99
}
1010

11-
impl imports::Imports for MyImports {
11+
impl imports::Host for MyImports {
1212
fn thunk(&mut self) -> Result<()> {
1313
self.hit = true;
1414
println!("in the host");

tests/runtime/strings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ wasmtime::component::bindgen!("world" in "tests/runtime/strings");
66
#[derive(Default)]
77
pub struct MyImports;
88

9-
impl imports::Imports for MyImports {
9+
impl imports::Host for MyImports {
1010
fn take_basic(&mut self, s: String) -> Result<()> {
1111
assert_eq!(s, "latin utf16");
1212
Ok(())

0 commit comments

Comments
 (0)