You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
Convert wasm module to component success, target/wasm32-wasi/release/wasm_lib.component.wasm
Run component: target/wasm32-wasi/release/wasm_lib.component.wasm
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: error while executing at wasm backtrace:
0: 0x204d9a - wit-component:shim!adapt-wasi_snapshot_preview1-environ_sizes_get
1: 0x8ef5 - <unknown>!__wasi_environ_sizes_get
2: 0x8f5c - <unknown>!__wasilibc_initialize_environ
3: 0x8ffc - <unknown>!__wasilibc_initialize_environ_eagerly
4: 0x570 - <unknown>!__wasm_call_ctors
5: 0xda10 - <unknown>!cabi_realloc.command_export
6: 0x204493 - wit-component:adapter:wasi_snapshot_preview1!initialize_stack_pointer
note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
Caused by:
wasm trap: uninitialized element', src/main.rs:51:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I create a demo repo to show this case. https://github.com/fuxiaohei/wasmtime-component-wasi-preview-test
wit code:
generate exports code in https://github.com/fuxiaohei/wasmtime-component-wasi-preview-test/blob/main/wasm_lib/src/lib.rs with latest
wit-bindgen-guest-rust = { git = "https://github.com/bytecodealliance/wit-bindgen" }then I build wasm32-wasi target and convert to component with same code in
host testsin this repo and currentwasi_snapshot_preview1.wasmin release page.https://github.com/fuxiaohei/wasmtime-component-wasi-preview-test/blob/main/src/main.rs#L5
but it runs failed and shows error msg:
You can follow the readme and reproduce this case.
It can reproduce in actions: https://github.com/fuxiaohei/wasmtime-component-wasi-preview-test/actions/runs/4089812259.
maybe I miss something details to convert module to component in wasi case.