shared memory: make it available in no-std
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the threads feature gating and crates/wasmtime/src/runtime/vm/memory/shared_memory.rs, then review the referenced PR 15312 and the serialization test in crates/wasmtime/src/engine/serialization.rs. The work is to make SharedMemory available in no-std environments while handling the runtime constraints described in the issue. Done means a no-std runtime can use shared memory without relying on the listed std facilities or Linux syscalls.
索引モデルが issue の本文から書いたものです。
説明
Feature
SharedMemory is currently gated by "threads" cargo feature in wasmtime,
which depends on std. It would be nice to make it available in no-std environments.
Benefit
More context is available in the comments in PR 15312, but, briefly, we are exploring loading WASM modules (pre-compiled) inside Linux kernel because WASM is vastly more ergonomic to work with compared to eBPF; and we need these modules to use shared memory because the "wasm host" (= Linux kernel) may call into "wasm guest" from multiple threads.
Implementation
A first attempt was done in PR 15312, which was not properly thought-out. I'm willing to take another stub at this if the feature is deemed useful.
Alternatives explored:
Alternative A: compile wasmtime runtime with no-std, but load module which is std+threads
This does not work:
Module was compiled with support for WebAssembly feature 'threads' but it is not enabled for the host
there is even an explicit test for this
Alternative B: compile wasmtime runtime for Linux with std
This won't work either, as wasmtime will use std::sync::Mutex, thread_local!, try to call Linux syscalls, etc. This will break inside the kernel in many ways. Even SharedMemory::new() itself will call mmap directly
- 主要言語
- Rust
- スター
- 18.9k
- フォーク
- 2k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 238
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bytecodealliance/wasmtime のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bytecodealliance/wasmtime#15536 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
bytecodealliance/wasmtime#15455 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
wasi-preview1-component-adapter: fd_write does not invalidate cached InputStream, causing stale reads対応中かも @dpfens が 13 日前に担当しました。 オープンwasi
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bytecodealliance/wasmtime#15296 ·
メンテナーはふだん 1 日以内に返信
-
bug wasm-proposal:exceptions wasmtime:debugging
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bytecodealliance/wasmtime#14102 ·
メンテナーはふだん 1 日以内に返信
-
wasm-proposal:gc
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
bytecodealliance/wasmtime#13808 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
bytecodealliance/wasmtime の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area: plugins bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
clipy-recorder/clipy#1039 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
valkey-io/valkey-glide#7975 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gofractally/psibase#2379 ·
メンテナーはふだん 3 日以内に返信
-
Qwen stream parser: a chunk with "error": null is treated as a stream error対応中かも @Beehtrix が今日担当しました。 オープンarea:models bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
brekkylab/ailoy#681 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信