From 750ff0472867be73c86eaecfb1e88a93c50763c2 Mon Sep 17 00:00:00 2001 From: Michael Cooney Date: Mon, 30 Sep 2024 16:43:54 -0400 Subject: [PATCH] enable winch by default (#379) --- ext/Cargo.toml | 2 +- ext/src/ruby_api/engine.rs | 2 +- spec/unit/engine_spec.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/Cargo.toml b/ext/Cargo.toml index 2b1672d8..49dc753b 100644 --- a/ext/Cargo.toml +++ b/ext/Cargo.toml @@ -11,7 +11,7 @@ build = "build.rs" unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ruby_gte_3_0)'] } [features] -default = ["tokio", "all-arch"] +default = ["tokio", "all-arch", "winch"] embed = ["magnus/embed"] tokio = ["dep:tokio", "dep:async-timer"] all-arch = ["wasmtime/all-arch"] diff --git a/ext/src/ruby_api/engine.rs b/ext/src/ruby_api/engine.rs index b8347fd0..1a24c156 100644 --- a/ext/src/ruby_api/engine.rs +++ b/ext/src/ruby_api/engine.rs @@ -81,7 +81,7 @@ impl Engine { /// @option config [Boolean] :generate_address_map Configures whether compiled artifacts will contain information to map native program addresses back to the original wasm module. This configuration option is `true` by default. Disabling this feature can result in considerably smaller serialized modules. /// @option config [Symbol] :cranelift_opt_level One of +none+, +speed+, +speed_and_size+. /// @option config [Symbol] :profiler One of +none+, +jitdump+, +vtune+. - /// @option config [Symbol] :strategy One of +auto+, +cranelift+, +winch+ (requires crate feature `winch` to be enabled) + /// @option config [Symbol] :strategy One of +auto+, +cranelift+, +winch+ /// @option config [String] :target /// /// @see https://docs.rs/wasmtime/latest/wasmtime/struct.Engine.html diff --git a/spec/unit/engine_spec.rb b/spec/unit/engine_spec.rb index 4c2f6ddc..bac67c75 100644 --- a/spec/unit/engine_spec.rb +++ b/spec/unit/engine_spec.rb @@ -41,6 +41,7 @@ module Wasmtime # enum options represented as symbols [ + [:strategy, [:auto, :cranelift, :winch]], [:cranelift_opt_level, [:none, :speed, :speed_and_size]], [:profiler, profiler_options] ].each do |option, valid|