Skip to content

Commit a1cf0c6

Browse files
committed
update Wasmtime dep to release-37.0.0
v37.0.0 will be released later this month; this is a draft based on the Git branch for that release so we're ready when the release happens. Closes #3270 Signed-off-by: Joel Dice <[email protected]>
1 parent d1eb9ac commit a1cf0c6

File tree

11 files changed

+497
-401
lines changed

11 files changed

+497
-401
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@ tower-service = "0.3.3"
170170
tracing = { version = "0.1.41", features = ["log"] }
171171
url = "2"
172172
walkdir = "2"
173-
wasm-encoder = "0.236.1"
174-
wasm-metadata = "0.236.1"
173+
wasm-encoder = "0.239.0"
174+
wasm-metadata = "0.239.0"
175175
wasm-pkg-client = "0.11"
176176
wasm-pkg-common = "0.11"
177-
wasmparser = "0.236.1"
178-
wasmtime = "36.0.2"
179-
wasmtime-wasi = "36.0.2"
180-
wasmtime-wasi-http = "36.0.2"
181-
wit-component = "0.236.1"
182-
wit-parser = "0.236.1"
177+
wasmparser = "0.239.0"
178+
wasmtime = { git = "https://github.com/bytecodealliance/wasmtime", branch = "release-37.0.0" }
179+
wasmtime-wasi = { git = "https://github.com/bytecodealliance/wasmtime", branch = "release-37.0.0" }
180+
wasmtime-wasi-http = { git = "https://github.com/bytecodealliance/wasmtime", branch = "release-37.0.0" }
181+
wit-component = "0.239.0"
182+
wit-parser = "0.239.0"
183183

184184
spin-componentize = { path = "crates/componentize" }
185185

crates/core/tests/integration_test.rs

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use spin_core::{AsState, Component, Config, Engine, State, Store, StoreBuilder,
99
use spin_factor_wasi::{DummyFilesMounter, WasiFactor};
1010
use spin_factors::{App, AsInstanceState, RuntimeFactors};
1111
use spin_locked_app::locked::LockedApp;
12-
use tokio::{fs, io::AsyncWrite};
12+
use tokio::fs;
1313
use wasmtime_wasi::I32Exit;
1414

1515
#[tokio::test(flavor = "multi_thread")]
@@ -169,44 +169,3 @@ async fn run_test(
169169
.0
170170
.map_err(|()| anyhow::anyhow!("command failed"))
171171
}
172-
173-
// Write with `print!`, required for test output capture
174-
struct TestWriter(tokio::io::Stdout);
175-
176-
impl std::io::Write for TestWriter {
177-
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
178-
print!("{}", String::from_utf8_lossy(buf));
179-
Ok(buf.len())
180-
}
181-
182-
fn flush(&mut self) -> std::io::Result<()> {
183-
Ok(())
184-
}
185-
}
186-
187-
impl AsyncWrite for TestWriter {
188-
fn poll_write(
189-
self: std::pin::Pin<&mut Self>,
190-
cx: &mut std::task::Context<'_>,
191-
buf: &[u8],
192-
) -> std::task::Poll<Result<usize, std::io::Error>> {
193-
let this = self.get_mut();
194-
std::pin::Pin::new(&mut this.0).poll_write(cx, buf)
195-
}
196-
197-
fn poll_flush(
198-
self: std::pin::Pin<&mut Self>,
199-
cx: &mut std::task::Context<'_>,
200-
) -> std::task::Poll<Result<(), std::io::Error>> {
201-
let this = self.get_mut();
202-
std::pin::Pin::new(&mut this.0).poll_flush(cx)
203-
}
204-
205-
fn poll_shutdown(
206-
self: std::pin::Pin<&mut Self>,
207-
cx: &mut std::task::Context<'_>,
208-
) -> std::task::Poll<Result<(), std::io::Error>> {
209-
let this = self.get_mut();
210-
std::pin::Pin::new(&mut this.0).poll_shutdown(cx)
211-
}
212-
}

crates/environments/src/environment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ mod test {
459459
let mut resolve = wit_parser::Resolve::default();
460460
let package_id = resolve.push_str("test", wit).expect("should parse WIT");
461461
let world_id = resolve
462-
.select_world(package_id, Some(world))
462+
.select_world(&[package_id], Some(world))
463463
.expect("should select world");
464464

465465
let mut wasm = wit_component::dummy_module(

crates/factor-outbound-networking/tests/factor_test.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
use spin_factor_outbound_networking::runtime_config::spin::SpinRuntimeConfig;
21
use spin_factor_outbound_networking::OutboundNetworkingFactor;
2+
use spin_factor_outbound_networking::runtime_config::spin::SpinRuntimeConfig;
33
use spin_factor_variables::VariablesFactor;
44
use spin_factor_wasi::{DummyFilesMounter, WasiFactor};
5-
use spin_factors::{anyhow, RuntimeFactors};
6-
use spin_factors_test::{toml, TestEnvironment};
5+
use spin_factors::{RuntimeFactors, anyhow};
6+
use spin_factors_test::{TestEnvironment, toml};
77
use wasmtime_wasi::p2::bindings::sockets::instance_network::Host;
8-
use wasmtime_wasi::SocketAddrUse;
8+
use wasmtime_wasi::sockets::SocketAddrUse;
99

1010
#[derive(RuntimeFactors)]
1111
struct TestFactors {
@@ -35,10 +35,10 @@ async fn configures_wasi_socket_addr_check() -> anyhow::Result<()> {
3535
..Default::default()
3636
})?;
3737
let mut state = env.build_instance_state().await?;
38-
let mut wasi = WasiFactor::get_wasi_impl(&mut state).unwrap();
38+
let mut sockets = WasiFactor::get_sockets_impl(&mut state).unwrap();
3939

40-
let network_resource = wasi.instance_network()?;
41-
let network = wasi.table.get(&network_resource)?;
40+
let network_resource = sockets.instance_network()?;
41+
let network = sockets.table.get(&network_resource)?;
4242

4343
network
4444
.check_socket_addr(

0 commit comments

Comments
 (0)