aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2024-07-02 07:02:03 -0700
committerGitHub <[email protected]>2024-07-02 07:02:03 -0700
commit9cb263479c4b98f2d28889ca1acc297454e0d875 (patch)
treea30bcf8ef9086c5b8edfcee3b42bef352f396878 /targets
parentf18c6e342f834988caf43fd652b2baae9c3093f0 (diff)
downloadtinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.tar.gz
tinygo-9cb263479c4b98f2d28889ca1acc297454e0d875.zip
wasi preview 2 support (#4027)
* all: wasip2 support Co-authored-by: Randy Reddig <[email protected]>
Diffstat (limited to 'targets')
-rw-r--r--targets/wasip2.json28
1 files changed, 28 insertions, 0 deletions
diff --git a/targets/wasip2.json b/targets/wasip2.json
new file mode 100644
index 000000000..3d6f68c6e
--- /dev/null
+++ b/targets/wasip2.json
@@ -0,0 +1,28 @@
+{
+ "llvm-target": "wasm32-unknown-wasi",
+ "cpu": "generic",
+ "features": "+bulk-memory,+mutable-globals,+nontrapping-fptoint,+sign-ext",
+ "build-tags": ["tinygo.wasm", "wasip2"],
+ "goos": "linux",
+ "goarch": "arm",
+ "linker": "wasm-ld",
+ "libc": "wasmbuiltins",
+ "rtlib": "compiler-rt",
+ "scheduler": "asyncify",
+ "default-stack-size": 65536,
+ "cflags": [
+ "-mbulk-memory",
+ "-mnontrapping-fptoint",
+ "-msign-ext"
+ ],
+ "ldflags": [
+ "--stack-first",
+ "--no-demangle"
+ ],
+ "extra-files": [
+ "src/runtime/asm_tinygowasm.S"
+ ],
+ "emulator": "wasmtime --wasm component-model --dir={tmpDir}::/tmp {}",
+ "wit-package": "{root}/lib/wasi-cli/wit/",
+ "wit-world": "wasi:cli/command"
+}