
Exporting symbols seems to embed them in the WASM exports section which causes wasmtime to fail: https://github.com/bytecodealliance/wasmtime/issues/2587 As a workaround, it is possible to specify the `--allow-unknown-exports` flag on wasmtime. But as discussed in the above linked issue, this seems to only be a workaround. For the Rust compiler the fix was to remove the `--export-dynamic` linker flag when targeting `wasm32-wasi`: https://github.com/rust-lang/rust/pull/81255 Which is waht this commit does for Tinygo too.
18 строки
427 Б
JSON
18 строки
427 Б
JSON
{
|
|
"llvm-target": "wasm32-unknown-wasi",
|
|
"cpu": "generic",
|
|
"build-tags": ["tinygo.wasm", "wasi"],
|
|
"goos": "linux",
|
|
"goarch": "arm",
|
|
"linker": "wasm-ld",
|
|
"libc": "wasi-libc",
|
|
"scheduler": "asyncify",
|
|
"default-stack-size": 16384,
|
|
"ldflags": [
|
|
"--allow-undefined",
|
|
"--stack-first",
|
|
"--no-demangle"
|
|
],
|
|
"emulator": ["wasmtime"],
|
|
"wasm-abi": "generic"
|
|
}
|