Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ext/src/ruby_api/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ define_rb_intern!(
POOLING => "pooling",
ON_DEMAND => "on_demand",
WASM_REFERENCE_TYPES => "wasm_reference_types",
WASM_EXCEPTIONS => "wasm_exceptions",
ASYNC_STACK_ZEROING => "async_stack_zeroing",
);

Expand Down Expand Up @@ -105,6 +106,8 @@ pub fn hash_to_config(hash: RHash) -> Result<Config, Error> {
config.parallel_compilation(entry.try_into()?);
} else if *WASM_REFERENCE_TYPES == id {
config.wasm_reference_types(entry.try_into()?);
} else if *WASM_EXCEPTIONS == id {
config.wasm_exceptions(entry.try_into()?);
} else if *PROFILER == id {
config.profiler(entry.try_into()?);
} else if *CRANELIFT_OPT_LEVEL == id {
Expand Down
1 change: 1 addition & 0 deletions ext/src/ruby_api/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl Engine {
/// @option config [Boolean] :wasm_multi_memory
/// @option config [Boolean] :wasm_memory64
/// @option config [Boolean] :wasm_reference_types
/// @option config [Boolean] :wasm_exceptions Whether the WebAssembly exception-handling proposal is enabled.
/// @option config [Boolean] :parallel_compilation (true) Whether compile Wasm using multiple threads
/// @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+.
Expand Down
1 change: 1 addition & 0 deletions spec/unit/engine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Wasmtime
[:wasm_memory64, true],
[:parallel_compilation, true],
[:wasm_reference_types, true],
[:wasm_exceptions, true],
[:async_stack_zeroing, true]
].each do |option, valid, invalid = nil|
it "supports #{option}" do
Expand Down
Loading