Skip to content

Commit d87c0e0

Browse files
authored
Bump wasmtime to v30.0.2 (#440)
* Bump wasmtime to v30.0.2 Grabbing the latest patch release since it contains the latest fixes. This change also mirrors the `async_stack_zeroing` change, introduced in bytecodealliance/wasmtime#10027 * Document `async_stack_zeroing` at the engine level * Update nightly version * Bump `yard-rustdoc` * Strip the nightly version after reading it To ensure no unwanted new lines or spaces are included as part of interpolation
1 parent b3db65c commit d87c0e0

File tree

11 files changed

+229
-228
lines changed

11 files changed

+229
-228
lines changed

Cargo.lock

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

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
wasmtime (29.0.0)
4+
wasmtime (30.0.2)
55
rb_sys (~> 0.9.108)
66

77
GEM
@@ -84,14 +84,14 @@ GEM
8484
standard-performance (1.6.0)
8585
lint_roller (~> 1.1)
8686
rubocop-performance (~> 1.23.0)
87-
syntax_tree (5.3.0)
87+
syntax_tree (6.2.0)
8888
prettier_print (>= 1.2.0)
8989
unicode-display_width (3.1.4)
9090
unicode-emoji (~> 4.0, >= 4.0.4)
9191
unicode-emoji (4.0.4)
9292
yard (0.9.37)
93-
yard-rustdoc (0.4.0)
94-
syntax_tree (~> 5.0)
93+
yard-rustdoc (0.4.1)
94+
syntax_tree (~> 6.0)
9595
yard (~> 0.9)
9696

9797
PLATFORMS

NIGHTLY_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2024-08-19
1+
nightly-2025-03-04

ext/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ magnus = { version = "0.7", features = ["rb-sys"] }
2424
rb-sys = { version = "*", default-features = false, features = [
2525
"stable-api-compiled-fallback",
2626
] }
27-
wasmtime = { version = "=29.0.0", features = ["memory-protection-keys"] }
28-
wasmtime-wasi = "=29.0.0"
29-
wasi-common = "=29.0.0"
27+
wasmtime = { version = "=30.0.2", features = ["memory-protection-keys"] }
28+
wasmtime-wasi = "=30.0.2"
29+
wasi-common = "=30.0.2"
3030
cap-std = "3.4.0"
3131
wat = "1.218.0"
3232
tokio = { version = "1.40.0", features = [
@@ -39,8 +39,8 @@ async-timer = { version = "1.0.0-beta.15", features = [
3939
"tokio1",
4040
], optional = true }
4141
static_assertions = "1.1.0"
42-
wasmtime-environ = "=29.0.0"
43-
deterministic-wasi-ctx = "=0.1.29"
42+
wasmtime-environ = "=30.0.2"
43+
deterministic-wasi-ctx = "=0.1.30"
4444

4545
[build-dependencies]
4646
rb-sys-env = "0.2.2"

ext/src/ruby_api/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ define_rb_intern!(
4646
POOLING => "pooling",
4747
ON_DEMAND => "on_demand",
4848
WASM_REFERENCE_TYPES => "wasm_reference_types",
49+
ASYNC_STACK_ZEROING => "async_stack_zeroing",
4950
);
5051

5152
lazy_static! {
@@ -126,6 +127,8 @@ pub fn hash_to_config(hash: RHash) -> Result<Config, Error> {
126127
} else if *ALLOCATION_STRATEGY == id {
127128
let strategy: InstanceAllocationStrategy = entry.try_into()?;
128129
config.allocation_strategy(strategy);
130+
} else if *ASYNC_STACK_ZEROING == id {
131+
config.async_stack_zeroing(entry.try_into()?);
129132
} else {
130133
return Err(Error::new(
131134
arg_error(),

ext/src/ruby_api/engine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ impl Engine {
6767
/// @param config [Hash] The engine's config.
6868
/// See the {https://docs.rs/wasmtime/latest/wasmtime/struct.Engine.html +Config+‘s Rust doc} for detailed description of
6969
/// the different options and the defaults.
70+
/// @option config [Boolean] :async_stack_zeroing Configures whether or not stacks used for async futures are zeroed before (re)use.
7071
/// @option config [Boolean] :debug_info
7172
/// @option config [Boolean] :wasm_backtrace_details
7273
/// @option config [Boolean] :native_unwind_info

ext/src/ruby_api/pooling_allocation_config.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ impl PoolingAllocationConfig {
100100
Ok(rb_self)
101101
}
102102

103-
/// @def async_stack_zeroing=(enable)
104-
/// @param enable [Boolean]
105-
/// @return [Wasmtime::PoolingAllocationConfig]
106-
pub fn set_async_stack_zeroing(rb_self: Obj<Self>, enable: Value) -> Result<Obj<Self>, Error> {
107-
rb_self
108-
.borrow_mut()?
109-
.async_stack_zeroing(enable.as_raw() == RUBY_Qtrue as VALUE);
110-
Ok(rb_self)
111-
}
112-
113103
/// @def linear_memory_keep_resident=
114104
/// @param size [Integer]
115105
/// @return [Wasmtime::PoolingAllocationConfig]
@@ -324,10 +314,6 @@ pub fn init() -> Result<(), Error> {
324314
"async_stack_keep_resident=",
325315
method!(PoolingAllocationConfig::set_async_stack_keep_resident, 1),
326316
)?;
327-
class.define_method(
328-
"async_stack_zeroing=",
329-
method!(PoolingAllocationConfig::set_async_stack_zeroing, 1),
330-
)?;
331317
class.define_method(
332318
"linear_memory_keep_resident=",
333319
method!(PoolingAllocationConfig::set_linear_memory_keep_resident, 1),

lib/wasmtime/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Wasmtime
4-
VERSION = "29.0.0"
4+
VERSION = "30.0.2"
55
end

rakelib/doc.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ namespace :doc do
8181

8282
desc "Generate Rust documentation as JSON"
8383
task :rustdoc do
84-
nightly = File.readlines("NIGHTLY_VERSION").first
84+
nightly = File.readlines("NIGHTLY_VERSION").first.strip
8585
sh <<~CMD
8686
cargo +#{nightly} rustdoc \
8787
--target-dir tmp/doc/target \

spec/unit/engine_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ module Wasmtime
2828
[:wasm_multi_memory, true],
2929
[:wasm_memory64, true],
3030
[:parallel_compilation, true],
31-
[:wasm_reference_types, true]
31+
[:wasm_reference_types, true],
32+
[:async_stack_zeroing, true]
3233
].each do |option, valid, invalid = nil|
3334
it "supports #{option}" do
3435
Engine.new(option => valid)

0 commit comments

Comments
 (0)