
Previously we used the --export-all linker flag to export most functions. However, this is not needed and possibly increases binary size. Instead, we should be exporting the specific functions to be exported.
21 строка
458 Б
JSON
21 строка
458 Б
JSON
{
|
|
"llvm-target": "wasm32--wasi",
|
|
"build-tags": ["js", "wasm"],
|
|
"goos": "js",
|
|
"goarch": "wasm",
|
|
"compiler": "clang",
|
|
"linker": "wasm-ld",
|
|
"libc": "wasi-libc",
|
|
"cflags": [
|
|
"--target=wasm32--wasi",
|
|
"--sysroot={root}/lib/wasi-libc/sysroot",
|
|
"-Oz"
|
|
],
|
|
"ldflags": [
|
|
"--allow-undefined",
|
|
"--stack-first",
|
|
"--no-demangle"
|
|
],
|
|
"emulator": ["node", "targets/wasm_exec.js"],
|
|
"wasm-abi": "js"
|
|
}
|