Skip to content

Commit 1250749

Browse files
authored
Merge pull request #2855 from fermyon/more-updates
More dependency updates
2 parents cedb9b0 + 0fbb84c commit 1250749

File tree

17 files changed

+230
-370
lines changed

17 files changed

+230
-370
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ clearscreen = "3"
2424
comfy-table = "7"
2525
command-group = "2"
2626
ctrlc = { version = "3.4", features = ["termination"] }
27-
dialoguer = "0.10"
27+
dialoguer = "0.11"
2828
dirs = { workspace = true }
2929
futures = { workspace = true }
3030
glob = { workspace = true }
3131
indicatif = "0.17"
3232
is-terminal = "0.4"
3333
itertools = { workspace = true }
34-
lazy_static = "1.4.0"
35-
levenshtein = "1.0.5"
34+
lazy_static = "1.5"
35+
levenshtein = "1"
3636
nix = { version = "0.29", features = ["signal"] }
37-
path-absolutize = "3.0.11"
37+
path-absolutize = "3"
3838
rand = { workspace = true }
3939
regex = { workspace = true }
4040
reqwest = { workspace = true }
41-
rpassword = "7.0"
42-
semver = "1.0"
43-
serde = { version = "1.0", features = ["derive"] }
41+
rpassword = "7"
42+
semver = "1"
43+
serde = { version = "1", features = ["derive"] }
4444
serde_json = { workspace = true }
4545
sha2 = { workspace = true }
4646
subprocess = "0.2"

crates/componentize/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ rust-version.workspace = true
1111
[dependencies]
1212
anyhow = { workspace = true }
1313
tracing = { workspace = true }
14-
wasm-encoder = "0.200.0"
15-
wasm-metadata = "0.200.0"
16-
wasmparser = "0.200.0"
17-
wit-component = "0.200.0"
18-
wit-parser = "0.200.0"
14+
wasm-encoder = "0.217"
15+
wasm-metadata = "0.217"
16+
wasmparser = "0.217"
17+
wit-component = "0.217"
18+
wit-parser = "0.217"
1919

2020
[dev-dependencies]
2121
async-trait = { workspace = true }
22-
cap-std = "2.0"
22+
cap-std = "3"
2323
rand = { workspace = true }
2424
rand_chacha = "0.3"
2525
rand_core = "0.6"

crates/componentize/src/convert.rs

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
#![allow(clippy::from_over_into)]
22

3-
use {
4-
wasm_encoder::{
5-
EntityType, ExportKind, GlobalType, HeapType, MemoryType, RefType, TableType, TagKind,
6-
TagType, ValType,
7-
},
8-
wasmparser::{ExternalKind, TypeRef},
3+
use wasm_encoder::{
4+
AbstractHeapType, EntityType, ExportKind, GlobalType, HeapType, MemoryType, RefType, TableType,
5+
TagKind, TagType, ValType,
96
};
107

118
struct IntoHeapType(wasmparser::HeapType);
129

1310
impl Into<HeapType> for IntoHeapType {
1411
fn into(self) -> HeapType {
1512
match self.0 {
16-
wasmparser::HeapType::Func => HeapType::Func,
17-
wasmparser::HeapType::Extern => HeapType::Extern,
1813
wasmparser::HeapType::Concrete(_) => {
1914
panic!("user-defined heap types not yet supported")
2015
}
21-
wasmparser::HeapType::Any => HeapType::Any,
22-
wasmparser::HeapType::None => HeapType::None,
23-
wasmparser::HeapType::NoExtern => HeapType::NoExtern,
24-
wasmparser::HeapType::NoFunc => HeapType::NoFunc,
25-
wasmparser::HeapType::Eq => HeapType::Eq,
26-
wasmparser::HeapType::Struct => HeapType::Struct,
27-
wasmparser::HeapType::Array => HeapType::Array,
28-
wasmparser::HeapType::I31 => HeapType::I31,
29-
wasmparser::HeapType::Exn => HeapType::Exn,
16+
wasmparser::HeapType::Abstract { ty, shared } => {
17+
let ty = match ty {
18+
wasmparser::AbstractHeapType::Func => AbstractHeapType::Func,
19+
wasmparser::AbstractHeapType::Extern => AbstractHeapType::Extern,
20+
wasmparser::AbstractHeapType::Any => AbstractHeapType::Any,
21+
wasmparser::AbstractHeapType::None => AbstractHeapType::None,
22+
wasmparser::AbstractHeapType::NoExtern => AbstractHeapType::NoExtern,
23+
wasmparser::AbstractHeapType::NoFunc => AbstractHeapType::NoFunc,
24+
wasmparser::AbstractHeapType::Eq => AbstractHeapType::Eq,
25+
wasmparser::AbstractHeapType::Struct => AbstractHeapType::Struct,
26+
wasmparser::AbstractHeapType::Array => AbstractHeapType::Array,
27+
wasmparser::AbstractHeapType::I31 => AbstractHeapType::I31,
28+
wasmparser::AbstractHeapType::Exn => AbstractHeapType::Exn,
29+
wasmparser::AbstractHeapType::NoExn => AbstractHeapType::NoExn,
30+
};
31+
HeapType::Abstract { shared, ty }
32+
}
3033
}
3134
}
3235
}
@@ -67,45 +70,49 @@ impl Into<TagKind> for IntoTagKind {
6770
}
6871
}
6972

70-
pub struct IntoEntityType(pub TypeRef);
73+
pub struct IntoEntityType(pub wasmparser::TypeRef);
7174

7275
impl Into<EntityType> for IntoEntityType {
7376
fn into(self) -> EntityType {
7477
match self.0 {
75-
TypeRef::Func(index) => EntityType::Function(index),
76-
TypeRef::Table(ty) => EntityType::Table(TableType {
78+
wasmparser::TypeRef::Func(index) => EntityType::Function(index),
79+
wasmparser::TypeRef::Table(ty) => EntityType::Table(TableType {
7780
element_type: IntoRefType(ty.element_type).into(),
7881
minimum: ty.initial,
7982
maximum: ty.maximum,
83+
table64: ty.table64,
84+
shared: ty.shared,
8085
}),
81-
TypeRef::Memory(ty) => EntityType::Memory(MemoryType {
86+
wasmparser::TypeRef::Memory(ty) => EntityType::Memory(MemoryType {
8287
minimum: ty.initial,
8388
maximum: ty.maximum,
8489
memory64: ty.memory64,
8590
shared: ty.shared,
91+
page_size_log2: ty.page_size_log2,
8692
}),
87-
TypeRef::Global(ty) => EntityType::Global(GlobalType {
93+
wasmparser::TypeRef::Global(ty) => EntityType::Global(GlobalType {
8894
val_type: IntoValType(ty.content_type).into(),
8995
mutable: ty.mutable,
96+
shared: ty.shared,
9097
}),
91-
TypeRef::Tag(ty) => EntityType::Tag(TagType {
98+
wasmparser::TypeRef::Tag(ty) => EntityType::Tag(TagType {
9299
kind: IntoTagKind(ty.kind).into(),
93100
func_type_idx: ty.func_type_idx,
94101
}),
95102
}
96103
}
97104
}
98105

99-
pub struct IntoExportKind(pub ExternalKind);
106+
pub struct IntoExportKind(pub wasmparser::ExternalKind);
100107

101108
impl Into<ExportKind> for IntoExportKind {
102109
fn into(self) -> ExportKind {
103110
match self.0 {
104-
ExternalKind::Func => ExportKind::Func,
105-
ExternalKind::Table => ExportKind::Table,
106-
ExternalKind::Memory => ExportKind::Memory,
107-
ExternalKind::Global => ExportKind::Global,
108-
ExternalKind::Tag => ExportKind::Tag,
111+
wasmparser::ExternalKind::Func => ExportKind::Func,
112+
wasmparser::ExternalKind::Table => ExportKind::Table,
113+
wasmparser::ExternalKind::Memory => ExportKind::Memory,
114+
wasmparser::ExternalKind::Global => ExportKind::Global,
115+
wasmparser::ExternalKind::Tag => ExportKind::Tag,
109116
}
110117
}
111118
}

crates/componentize/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ pub fn componentize_old_bindgen(module: &[u8]) -> Result<Vec<u8>> {
135135
.collect::<HashSet<&str>>();
136136

137137
let (adapter, mut bindgen) = metadata::decode(SPIN_ADAPTER)?;
138+
let adapter = adapter.expect(
139+
"adapter module was malformed, and did not contain a 'component-type' custom section",
140+
);
138141

139142
let world = bindgen
140143
.resolve

crates/factor-llm/src/spin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn default_engine_creator(
5656
};
5757
#[cfg(not(feature = "llm"))]
5858
let engine = {
59-
let _ = (state_dir);
59+
let _ = state_dir;
6060
noop::NoopLlmEngine
6161
};
6262
let engine = Arc::new(Mutex::new(engine)) as Arc<Mutex<dyn LlmEngine>>;
@@ -113,7 +113,7 @@ impl LlmCompute {
113113
let engine: Arc<Mutex<dyn LlmEngine>> = match self {
114114
#[cfg(not(feature = "llm"))]
115115
LlmCompute::Spin => {
116-
let _ = (state_dir);
116+
let _ = state_dir;
117117
Arc::new(Mutex::new(noop::NoopLlmEngine))
118118
}
119119
#[cfg(feature = "llm")]

crates/factor-outbound-networking/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http = { workspace = true }
1111
ipnet = "2"
1212
rustls = { workspace = true }
1313
rustls-pemfile = { version = "2", optional = true }
14-
rustls-pki-types = "1.7.0"
14+
rustls-pki-types = "1.8"
1515
serde = { workspace = true }
1616
spin-expressions = { path = "../expressions" }
1717
spin-factor-variables = { path = "../factor-variables" }
@@ -23,7 +23,7 @@ spin-serde = { path = "../serde" }
2323
terminal = { path = "../terminal" }
2424
tracing = { workspace = true }
2525
url = { workspace = true }
26-
urlencoding = "2.1"
26+
urlencoding = "2"
2727
webpki-roots = "0.26"
2828

2929
[dev-dependencies]

crates/factor-outbound-pg/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ edition = { workspace = true }
66

77
[dependencies]
88
anyhow = { workspace = true }
9-
native-tls = "0.2.11"
10-
postgres-native-tls = "0.5.0"
9+
native-tls = "0.2"
10+
postgres-native-tls = "0.5"
1111
spin-core = { path = "../core" }
1212
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
1313
spin-factors = { path = "../factors" }
1414
spin-world = { path = "../world" }
1515
table = { path = "../table" }
1616
tokio = { version = "1", features = ["rt-multi-thread"] }
17-
tokio-postgres = "0.7.7"
17+
tokio-postgres = "0.7"
1818
tracing = { workspace = true }
1919

2020
[dev-dependencies]

crates/factor-outbound-redis/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ edition = { workspace = true }
66

77
[dependencies]
88
anyhow = { workspace = true }
9-
redis = { version = "0.21", features = ["tokio-comp", "tokio-native-tls-comp", "aio"] }
9+
redis = { version = "0.25", features = ["tokio-comp", "tokio-native-tls-comp", "aio"] }
1010
spin-core = { path = "../core" }
1111
spin-factor-outbound-networking = { path = "../factor-outbound-networking" }
1212
spin-factors = { path = "../factors" }
1313
spin-world = { path = "../world" }
1414
table = { path = "../table" }
1515
tracing = { workspace = true }
1616

17-
1817
[dev-dependencies]
1918
spin-factor-variables = { path = "../factor-variables" }
2019
spin-factors-test = { path = "../factors-test" }
2120
tokio = { version = "1", features = ["macros", "rt"] }
2221

23-
# wasmtime-wasi-http = { workspace = true }
2422
[lints]
2523
workspace = true

crates/factor-outbound-redis/src/host.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::Result;
2-
use redis::{aio::Connection, AsyncCommands, FromRedisValue, Value};
2+
use redis::{aio::MultiplexedConnection, AsyncCommands, FromRedisValue, Value};
33
use spin_core::{async_trait, wasmtime::component::Resource};
44
use spin_factor_outbound_networking::OutboundAllowedHosts;
55
use spin_world::v1::{redis as v1, redis_types};
@@ -10,7 +10,7 @@ use tracing::{instrument, Level};
1010

1111
pub struct InstanceState {
1212
pub allowed_hosts: OutboundAllowedHosts,
13-
pub connections: table::Table<Connection>,
13+
pub connections: table::Table<MultiplexedConnection>,
1414
}
1515

1616
impl InstanceState {
@@ -24,7 +24,7 @@ impl InstanceState {
2424
) -> Result<Resource<RedisConnection>, Error> {
2525
let conn = redis::Client::open(address.as_str())
2626
.map_err(|_| Error::InvalidAddress)?
27-
.get_async_connection()
27+
.get_multiplexed_async_connection()
2828
.await
2929
.map_err(other_error)?;
3030
self.connections
@@ -36,7 +36,7 @@ impl InstanceState {
3636
async fn get_conn(
3737
&mut self,
3838
connection: Resource<RedisConnection>,
39-
) -> Result<&mut Connection, Error> {
39+
) -> Result<&mut MultiplexedConnection, Error> {
4040
self.connections
4141
.get_mut(connection.rep())
4242
.ok_or(Error::Other(

0 commit comments

Comments
 (0)