Stream: git-wasmtime

Topic: wasmtime / issue #9622 `Config::wasm_bulk_memory(false)` ...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2024 at 16:03):

nagisa added the bug label to Issue #9622.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2024 at 16:03):

nagisa opened issue #9622:

Test Case

N/A

Steps to Reproduce

  1. Depend on wasmtime with the runtime feature, but without the gc feature;
  2. Set Config::wasm_bulk_memory(false) (cannot set Config::wasm_reference_types);
  3. Invoke the runtime.

Expected Results

The wasm_reference_types feature should be considered disabled (and/or it should be possible to disable the feature without enabling the entire gc feature.)

Actual Results

wasmtime returns Err(feature 'reference_types' requires 'bulk_memory' to be enabled)

Versions and Environment

Wasmtime version or commit: 26.0.1

Operating system: Linux

Architecture: x86_64

Extra Info

wasm_reference_types config was not hidden behind a feature in the past. I'm attempting to update wasmtime from 14.0.1.

REFERENCE_TYPES gets set by the default set of supported features via WasmFeatures::WASM2.

My suggestion here is that Config parameters perhaps should not be gated by crate features.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2024 at 17:41):

alexcrichton commented on issue #9622:

Thanks for the report! I've updated this in https://github.com/bytecodealliance/wasmtime/pull/9623 to remove this now-unnecessary validation.

It's also perhaps worth noting that this is something where you may want to run wasmparser::validate ahead of time with a custom feature set if you're looking to turn off some features. That way you can be sure to disable reference-types even when the gc feature is disabled (as otherwise it'll always be enabled, it's just gc types that are disabled)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2024 at 17:47):

nagisa commented on issue #9622:

Cool, yeah that would work for me as I'm already validating with wasmparser first.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 19 2024 at 18:32):

alexcrichton closed issue #9622:

Test Case

N/A

Steps to Reproduce

  1. Depend on wasmtime with the runtime feature, but without the gc feature;
  2. Set Config::wasm_bulk_memory(false) (cannot set Config::wasm_reference_types);
  3. Invoke the runtime.

Expected Results

The wasm_reference_types feature should be considered disabled (and/or it should be possible to disable the feature without enabling the entire gc feature.)

Actual Results

wasmtime returns Err(feature 'reference_types' requires 'bulk_memory' to be enabled)

Versions and Environment

Wasmtime version or commit: 26.0.1

Operating system: Linux

Architecture: x86_64

Extra Info

wasm_reference_types config was not hidden behind a feature in the past. I'm attempting to update wasmtime from 14.0.1.

REFERENCE_TYPES gets set by the default set of supported features via WasmFeatures::WASM2.

My suggestion here is that Config parameters perhaps should not be gated by crate features.


Last updated: Nov 22 2024 at 16:03 UTC