Stream: git-wasmtime

Topic: wasmtime / issue #1658 --enable-threads does not enable s...


view this post on Zulip Wasmtime GitHub notifications bot (May 20 2022 at 18:24):

alexcrichton closed issue #1658:

I'm using Wasmtime 0.16.0.

I've noticed that, even with, --enable-threads, Wasmtime fails to parse modules defining shared memories, e.g.: https://github.com/GoogleChromeLabs/wasm-feature-detect/blob/master/src/detectors/threads/module.wat

(module
  (memory 1 1 shared)
  (func
    i32.const 0
    i32.atomic.load
    drop
  )
)

results in:

Caused by:
    0: failed directive on C:\Users\rreverser\Projects\wasm-feature-detect\src\detectors\threads\module.wat:5:1
    1: WebAssembly failed to compile
    2: WebAssembly translation error
    3: Unsupported feature: shared memories

While I know this feature is experimental and currently not very useful in Wasmtime, it seems unexpected because the comment for enable_threads suggests this should work at this flag enables shared memory and atomics:

https://github.com/bytecodealliance/wasmtime/blob/c284ffe6c036b8058228d576c46688968629b48c/crates/api/src/runtime.rs#L145-L147

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2022 at 18:24):

alexcrichton commented on issue #1658:

I'm going to close this in favor of https://github.com/bytecodealliance/wasmtime/issues/888 since it's otherwise a duplicate of that in that we're just missing big pieces of the threads proposal right now

view this post on Zulip Wasmtime GitHub notifications bot (May 20 2022 at 18:42):

abrown commented on issue #1658:

Just FYI: I'm working on this at the moment.


Last updated: Nov 22 2024 at 17:03 UTC