Composed component from `wac plug` throws `NotImplementedError`
還沒有人認領這個 Issue。
評估
研究方向
對 A 執行 componentize-py componentize,接著執行 wac plug --plug a.wasm b.wasm,並使用 wasmtime 呼叫 f-b(3),以重現此問題。檢查 b/interface/wit_world/imports/interface.py 中的 f_a,以及報告中顯示的 Python 實作。組合後的元件能夠在沒有 NotImplementedError 或執行階段 panic 的情況下執行 f-b(3),即表示完成。
由索引模型根據 Issue 內容生成。
描述
Hello,
I am experimenting with WASM components. I have two packages, A and B.
package example:a;
interface %type {
record blob {
x: f64,
}
}
interface %interface {
use %type.{blob};
f-a: func(x: f64) -> blob;
}
world %world {
export %type;
export %interface;
}
from a.interface.wit_world.exports import Interface as Base
from a.interface.wit_world.exports.type import Blob
class Interface(Base):
def f_a(self, x: float):
return Blob(x=x * 5)
package example:b;
interface %interface {
use example:a/%type.{blob};
f-b: func(x: f64) -> blob;
}
world %world {
import example:a/%interface;
export %interface;
}
from b.interface.wit_world.exports import Interface as Base
from b.interface.wit_world.imports.interface import f_a
class Interface(Base):
def f_b(self, x: float):
return f_a(f_a(x).x)
If I do componentize-py componentize on A, I can run this on the output successfully
wasmtime run --invoke 'f-a(3)' a.wasm
However, when i do
wac plug --plug a.wasm b.wasm --output composed.wasm
wasmtime run --invoke 'f-b(3)' composed.wasm
gives me
Traceback (most recent call last):
File "/1/b/implementation/__init__.py", line 11, in f_b1
File "/1/b/interface/wit_world/imports/interface.py", line 15, in f_a
NotImplementedError
thread '<unnamed>' (1) panicked at runtime/src/lib.rs:1290:25:
Python function threw an unexpected exception
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to run main module `composed.wasm`
Caused by:
0: error while executing at wasm backtrace:
0: 0x4b05657 - libc.so!abort
1: 0x2695395 - <unknown>!<wasm function 307>
2: 0x31fbc00 - libcomponentize_py_runtime_sync.so!std::sys::pal::wasip1::helpers::abort_internal
3: 0x31fdce0 - libcomponentize_py_runtime_sync.so!std::process::abort
4: 0x31eeaf7 - libcomponentize_py_runtime_sync.so!__rustc::__rust_abort
5: 0x318476f - libcomponentize_py_runtime_sync.so!__rustc::__rust_start_panic
6: 0x31ff807 - libcomponentize_py_runtime_sync.so!__rustc::rust_panic
7: 0x3200983 - libcomponentize_py_runtime_sync.so!std::panicking::panic_with_hook
8: 0x32038fc - libcomponentize_py_runtime_sync.so!std::panicking::panic_handler::{closure#0}
9: 0x320388f - libcomponentize_py_runtime_sync.so!std::sys::backtrace::__rust_end_short_backtrace::<std::panicking::panic_handler::{closure#0}, !>
10: 0x31ff8de - libcomponentize_py_runtime_sync.so!__rustc::rust_begin_unwind
11: 0x32453ff - libcomponentize_py_runtime_sync.so!core::panicking::panic_fmt
12: 0x31748f7 - libcomponentize_py_runtime_sync.so!wit_dylib_export_call
13: 0x4cd1934 - <unknown>!example:b/%interface#f-b
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
1: wasm trap: wasm `unreachable` instruction executed
Why doesn't the implementation of f-a end up in the composed component?
- 主要語言
- Rust
- 星號
- 284
- 分支
- 56
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 3
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
bytecodealliance/componentize-py 的其他 Issue
-
難度 3/5 半天 新手友好度 40/100
bytecodealliance/componentize-py#259 · 1 則留言 ·
-
wasm32-wasip3 target uses WASI preview 2 bindings可能已有人在做 @Snowiiii 於 6 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
-
難度 3/5 1-2 天 新手友好度 57/100
bytecodealliance/componentize-py#253 · 1 則留言 ·
-
難度 5/5 一週以上 新手友好度 35/100
bytecodealliance/componentize-py#247 · 12 則留言 ·
-
難度 3/5 1-2 天 新手友好度 68/100
bytecodealliance/componentize-py#217 · 6 則留言 ·
查看 bytecodealliance/componentize-py 的全部 Issue
相似的 Issue
-
[Bug] AM Context Monitor (am-monitor): Session turns count is capped at 80 due to turns.slice(-80)未關閉
難度 2/5 1-3 小時 新手友好度 83/100
lbjlaq/Antigravity-Manager#4180 ·
維護者通常 1 天內回覆
-
bug triage
難度 2/5 1-3 小時 新手友好度 78/100
zizmorcore/zizmor#2608 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 83/100
longbridge/nsh#4201 ·
維護者通常 1 天內回覆