Skip to content

Commit e721610

Browse files
authored
Merge pull request #3005 from alexcrichton/update-wasmtime
Update Wasmtime to 29.0.1
2 parents e5c6a13 + badc3b1 commit e721610

File tree

36 files changed

+698
-619
lines changed

36 files changed

+698
-619
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ wasi-common-preview1 = { version = "25.0.0", package = "wasi-common", features =
151151
] }
152152
wasm-pkg-common = "0.8"
153153
wasm-pkg-client = "0.8"
154-
wasmtime = "25.0.3"
155-
wasmtime-wasi = "25.0.0"
156-
wasmtime-wasi-http = "25.0.0"
154+
wasmtime = "29.0.1"
155+
wasmtime-wasi = "29.0.1"
156+
wasmtime-wasi-http = "29.0.1"
157157

158158
spin-componentize = { path = "crates/componentize" }
159159

crates/componentize/src/abi_conformance/test_config.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
use super::{config, Context, TestConfig};
22
use anyhow::{ensure, Result};
33
use std::collections::HashMap;
4-
use wasmtime::{
5-
component::{InstancePre, __internal::async_trait},
6-
Engine,
7-
};
4+
use wasmtime::{component::InstancePre, Engine};
85

96
#[derive(Default)]
107
pub(super) struct Config {
118
map: HashMap<String, String>,
129
}
1310

14-
#[async_trait]
1511
impl config::Host for Config {
1612
async fn get_config(&mut self, key: String) -> Result<Result<String, config::Error>> {
1713
Ok(self

crates/componentize/src/abi_conformance/test_http.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::{
44
Context, TestConfig,
55
};
66
use anyhow::{ensure, Result};
7-
use async_trait::async_trait;
87
use std::collections::HashMap;
98
use wasmtime::{component::InstancePre, Engine};
109

@@ -13,7 +12,6 @@ pub(crate) struct Http {
1312
map: HashMap<String, String>,
1413
}
1514

16-
#[async_trait]
1715
impl http::Host for Http {
1816
async fn send_request(&mut self, req: Request) -> Result<Result<Response, HttpError>> {
1917
Ok(self

crates/componentize/src/abi_conformance/test_key_value.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use super::{
33
Context, TestConfig,
44
};
55
use anyhow::{anyhow, ensure, Result};
6-
use async_trait::async_trait;
76
use serde::Serialize;
87
use std::{
98
collections::{HashMap, HashSet},
@@ -34,7 +33,6 @@ pub(crate) struct KeyValue {
3433
close_set: HashSet<KvStore>,
3534
}
3635

37-
#[async_trait]
3836
impl key_value::Host for KeyValue {
3937
async fn open(&mut self, name: String) -> Result<Result<KvStore, Error>> {
4038
Ok(self.open_map.remove(&name).ok_or_else(|| {

crates/componentize/src/abi_conformance/test_llm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::collections::HashMap;
22

33
use anyhow::{ensure, Result};
4-
use async_trait::async_trait;
54
use serde::Serialize;
65

76
use super::llm;
@@ -18,7 +17,6 @@ pub struct Llm {
1817
embeddings: HashMap<(String, Vec<String>), Vec<Vec<f32>>>,
1918
}
2019

21-
#[async_trait]
2220
impl llm::Host for Llm {
2321
async fn infer(
2422
&mut self,

crates/componentize/src/abi_conformance/test_mysql.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::{
44
Context, TestConfig,
55
};
66
use anyhow::{ensure, Result};
7-
use async_trait::async_trait;
87
use serde::Serialize;
98
use std::{
109
collections::{HashMap, HashSet},
@@ -40,7 +39,6 @@ pub(crate) struct Mysql {
4039
query_map: HashMap<(String, String, String), RowSet>,
4140
}
4241

43-
#[async_trait]
4442
impl mysql::Host for Mysql {
4543
async fn execute(
4644
&mut self,

crates/componentize/src/abi_conformance/test_postgres.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use super::{
44
Context, TestConfig,
55
};
66
use anyhow::{ensure, Result};
7-
use async_trait::async_trait;
87
use serde::Serialize;
98
use std::{collections::HashMap, iter};
109
use wasmtime::{component::InstancePre, Engine};
@@ -37,7 +36,6 @@ pub(crate) struct Postgres {
3736
query_map: HashMap<(String, String, String), RowSet>,
3837
}
3938

40-
#[async_trait]
4139
impl postgres::Host for Postgres {
4240
async fn execute(
4341
&mut self,

crates/componentize/src/abi_conformance/test_redis.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use super::{
33
Context, TestConfig,
44
};
55
use anyhow::{ensure, Result};
6-
use async_trait::async_trait;
76
use serde::Serialize;
87
use std::collections::{HashMap, HashSet};
98
use wasmtime::{component::InstancePre, Engine};
@@ -103,7 +102,6 @@ pub(crate) struct Redis {
103102
execute_map: HashMap<(String, String, Vec<Vec<u8>>), Vec<RedisResult>>,
104103
}
105104

106-
#[async_trait]
107105
impl redis::Host for Redis {
108106
async fn publish(
109107
&mut self,

crates/core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Default for Config {
108108
)
109109
.max_core_instances_per_component(env("SPIN_WASMTIME_CORE_INSTANCE_COUNT", 200))
110110
.max_tables_per_component(env("SPIN_WASMTIME_INSTANCE_TABLES", 20))
111-
.table_elements(env("SPIN_WASMTIME_INSTANCE_TABLE_ELEMENTS", 100_000))
111+
.table_elements(env("SPIN_WASMTIME_INSTANCE_TABLE_ELEMENTS", 100_000) as usize)
112112
// The number of memories an instance can have effectively limits the number of inner components
113113
// a composed component can have (since each inner component has its own memory). We default to 32 for now, and
114114
// we'll see how often this limit gets reached.
@@ -175,7 +175,7 @@ fn use_pooling_allocator_by_default() -> bool {
175175
// If the env var isn't set then perform the dynamic runtime probe
176176
let mut config = wasmtime::Config::new();
177177
config.wasm_memory64(true);
178-
config.static_memory_maximum_size(1 << BITS_TO_TEST);
178+
config.memory_reservation(1 << BITS_TO_TEST);
179179

180180
match wasmtime::Engine::new(&config) {
181181
Ok(engine) => {

0 commit comments

Comments
 (0)