Skip to content

Commit

Permalink
Bump wasmtime to 0.39.1
Browse files Browse the repository at this point in the history
- Bump `wit-bindgen` to a compatible revision
- Update docs
- Remove unnecessary wasmtime::Config options

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
  • Loading branch information
lann committed Aug 22, 2022
1 parent 1c9cb2e commit d99f46e
Show file tree
Hide file tree
Showing 44 changed files with 538 additions and 375 deletions.
526 changes: 347 additions & 179 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tracing-subscriber = { version = "0.3.7", features = [ "env-filter" ] }
url = "2.2.2"
uuid = "^1.0"
wasi-outbound-http = { path = "crates/outbound-http" }
wasmtime = "0.35.3"
wasmtime = "0.39.1"

[target.'cfg(target_os = "linux")'.dependencies]
# This needs to be an explicit dependency to enable
Expand Down
2 changes: 1 addition & 1 deletion crates/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [ "Fermyon Engineering <engineering@fermyon.com>" ]
anyhow = "1.0"
serde = { version = "1.0", features = [ "derive" ] }
thiserror = "1"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[dev-dependencies]
toml = "0.5"
10 changes: 5 additions & 5 deletions crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ tempfile = "3.3.0"
tokio = { version = "1.10.0", features = [ "fs" ] }
tracing = { version = "0.1", features = [ "log" ] }
tracing-futures = "0.2"
wasi-cap-std-sync = "0.35.3"
wasi-common = "0.35.3"
wasmtime = "0.35.3"
wasmtime-wasi = "0.35.3"
wasi-cap-std-sync = "0.39.1"
wasi-common = "0.39.1"
wasmtime = "0.39.1"
wasmtime-wasi = "0.39.1"
cap-std = "0.24.1"

[dev-dependencies]
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }
7 changes: 1 addition & 6 deletions crates/engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,7 @@ pub struct Engine(wasmtime::Engine);

impl Engine {
/// Create a new engine and initialize it with the given config.
pub fn new(mut config: wasmtime::Config) -> Result<Self> {
// In order for Wasmtime to run WebAssembly components, multi memory
// and module linking must always be enabled.
// See https://github.com/bytecodealliance/wit-bindgen/blob/main/crates/wasmlink.
config.wasm_multi_memory(true);
config.wasm_module_linking(true);
pub fn new(config: wasmtime::Config) -> Result<Self> {
Ok(Self(wasmtime::Engine::new(&config)?))
}

Expand Down
10 changes: 5 additions & 5 deletions crates/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ tracing = { version = "0.1", features = ["log"] }
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3.7", features = ["env-filter"] }
url = "2.2"
wasi-cap-std-sync = "0.35.3"
wasi-common = "0.35.3"
wasmtime = "0.35.3"
wasmtime-wasi = "0.35.3"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wasi-cap-std-sync = "0.39.1"
wasi-common = "0.39.1"
wasmtime = "0.39.1"
wasmtime-wasi = "0.39.1"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[dev-dependencies]
criterion = { version = "0.3.5", features = ["async_tokio"] }
Expand Down
24 changes: 12 additions & 12 deletions crates/http/benches/spin-http-benchmark/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/http/benches/spin-http-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
crate-type = [ "cdylib" ]

[dependencies]
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[workspace]
24 changes: 12 additions & 12 deletions crates/http/tests/rust-http-test/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/http/tests/rust-http-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
crate-type = [ "cdylib" ]

[dependencies]
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[workspace]
2 changes: 1 addition & 1 deletion crates/outbound-http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ tokio = { version = "1.4.0", features = [ "full" ] }
tracing = { version = "0.1", features = [ "log" ] }
tracing-futures = "0.2"
url = "2.2.1"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }
2 changes: 1 addition & 1 deletion crates/outbound-pg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ postgres = { version = "0.19.3" }
spin-engine = { path = "../engine" }
spin-manifest = { path = "../manifest" }
tracing = { version = "0.1", features = [ "log" ] }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }
2 changes: 1 addition & 1 deletion crates/outbound-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ anyhow = "1.0"
redis = { version = "0.21", features = [ "tokio-comp" ] }
spin-engine = { path = "../engine" }
spin-manifest = { path = "../manifest" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }
8 changes: 4 additions & 4 deletions crates/redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ tokio = { version = "1.14", features = [ "full" ] }
tracing = { version = "0.1", features = [ "log" ] }
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3.7", features = [ "env-filter" ] }
wasi-common = "0.35.3"
wasmtime = "0.35.3"
wasmtime-wasi = "0.35.3"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wasi-common = "0.39.1"
wasmtime = "0.39.1"
wasmtime-wasi = "0.39.1"
wit-bindgen-wasmtime = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[dev-dependencies]
spin-testing = { path = "../testing" }
24 changes: 12 additions & 12 deletions crates/redis/tests/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/redis/tests/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
crate-type = [ "cdylib" ]

[dependencies]
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }

[workspace]
2 changes: 1 addition & 1 deletion crates/trigger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ spin-loader = { path = "../loader" }
spin-manifest = { path = "../manifest" }
tracing = { version = "0.1", features = [ "log" ] }
wasi-outbound-http = { path = "../outbound-http" }
wasmtime = "0.35.3"
wasmtime = "0.39.1"
2 changes: 1 addition & 1 deletion docs/content/rust-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ http = "0.2"
# The Spin SDK.
spin-sdk = { git = "https://github.com/fermyon/spin" }
# Crate that generates Rust Wasm bindings from a WebAssembly interface.
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "dde4694aaa6acf9370206527a798ac4ba6a8c5b8" }
wit-bindgen-rust = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "cb871cfa1ee460b51eb1d144b175b9aab9c50aba" }
```

At the time of this writing, `wit-bindgen` must be pinned to a specific `rev`.
Expand Down
Loading

0 comments on commit d99f46e

Please sign in to comment.