Skip to content

Commit f1b9ca1

Browse files
authored
Merge pull request #418 from Shopify/ap.wasmtime-28
Bump `wasmtime` to version 28
2 parents 601e842 + 7c65864 commit f1b9ca1

10 files changed

+131
-128
lines changed

Cargo.lock

+101-117
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+24-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,29 @@ lto = true
2222
opt-level = 3
2323

2424
[dependencies]
25-
wasmtime = "=27.0.0"
26-
wasmtime-wasi = "=27.0.0"
27-
wasi-common = "=27.0.0"
28-
deterministic-wasi-ctx = "=0.1.27"
25+
wasmtime = { version = "=28.0.0", default-features = false, features = [
26+
"addr2line",
27+
"all-arch",
28+
"async",
29+
"cache",
30+
"component-model",
31+
"coredump",
32+
"cranelift",
33+
"debug-builtins",
34+
"demangle",
35+
"parallel-compilation",
36+
"pooling-allocator",
37+
"profiling",
38+
"runtime",
39+
"signals-based-traps",
40+
"std",
41+
"threads",
42+
"wat",
43+
"winch",
44+
] }
45+
wasmtime-wasi = "=28.0.0"
46+
wasi-common = "=28.0.0"
47+
deterministic-wasi-ctx = "=0.1.28"
2948
anyhow = "1.0"
3049
clap = { version = "4.5", features = ["derive"] }
3150
serde_json = "1.0"
@@ -34,7 +53,7 @@ serde = "1.0"
3453
rust-embed = "8.5.0"
3554
rmp-serde = "1.3"
3655
is-terminal = "0.4.13"
37-
wasmprof = "0.8.0"
56+
wasmprof = "0.9.0"
3857
bluejay-core = { version = "=0.2.0" }
3958
bluejay-parser = { version = "=0.2.0", features = ["format-errors"] }
4059
bluejay-validator = { version = "=0.2.0" }

rust-toolchain.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[toolchain]
2-
channel = "1.80.0"
2+
channel = "1.84.0"
3+
targets = [ "wasm32-wasip1" ]
34
components = [ "rustc", "rust-std", "cargo", "rust-docs", "rustfmt", "clippy" ]

src/engine.rs

-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ pub fn run(params: FunctionRunParams) -> Result<FunctionRunResult> {
122122
Config::new()
123123
.wasm_multi_memory(true)
124124
.wasm_threads(false)
125-
.wasm_reference_types(false)
126125
.consume_fuel(true)
127126
.epoch_interruption(true),
128127
)?;

src/scale_limits_analyzer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl<'a>
144144
}
145145
}
146146

147-
impl<'a> ScaleLimits<'a> {
147+
impl ScaleLimits<'_> {
148148
const MIN_SCALE_FACTOR: f64 = 1.0;
149149
const MAX_SCALE_FACTOR: f64 = 10.0;
150150

tests/fixtures/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Example Functions used as test fixtures.
55
## Recompiling
66

77
**Prereqs:**
8-
- Cargo WASI: `cargo install cargo-wasi`
8+
- wasm-opt from [binaryen](https://github.com/WebAssembly/binaryen)
99
- wat2wasm from [WABT](https://github.com/WebAssembly/wabt)
1010

1111

1212
**Rust examples:**
1313
```
14-
cargo wasi build --profile=wasm -p exit_code -p exports -p log_truncation_function -p noop &&
15-
cp target/wasm32-wasi/wasm/{exit_code.wasm,exports.wasm,log_truncation_function.wasm,noop.wasm} tests/fixtures/build
14+
cargo build --target wasm32-wasip1 --profile=wasm -p exit_code -p exports -p log_truncation_function -p noop &&
15+
find target/wasm32-wasip1/wasm/{exit_code.wasm,exports.wasm,log_truncation_function.wasm,noop.wasm} | xargs -I {} sh -c 'name=$(basename {}); wasm-opt {} -Oz --enable-bulk-memory --strip-debug -o "tests/fixtures/build/$name"'
1616
```
1717

1818
**JS examples:**

tests/fixtures/build/exit_code.wasm

-5.26 KB
Binary file not shown.

tests/fixtures/build/exports.wasm

-3.66 KB
Binary file not shown.
-3.32 KB
Binary file not shown.

tests/fixtures/build/noop.wasm

-3.48 KB
Binary file not shown.

0 commit comments

Comments
 (0)