Add wasm2c native compilation target and host runtime

Add native/extract_core.py to extract embedded core Wasm modules from curl.wasm and native/wasi_host.c providing a POSIX/OpenSSL WASI 0.2 host shim for wasm2c. Add native, test-native, and run-native recipes to justfile (with positional-arguments enabled), support CURL_WASM_NATIVE in tests/test_curl.py, ignore build artifacts in .gitignore, and document native compilation in README.md.
This commit is contained in:
Sprite committed 2026-11-20 00:07:33 +00:00
1 parent e04081daa0
commit 2ff249ff89
6 files changed
+1918 -3

No files matched your search

+10
View File
@@ -27,6 +27,16 @@ Run the test suite:
make test
```
## Compile to Native (`wasm2c`)
You can also compile `curl.wasm` into a standalone native binary (`./curl-native`, backed by POSIX sockets and OpenSSL) using `wasm2c` via `just`:
```sh
just native
just run-native -fsSI https://example.com
just test-native
```
## Supported Options
| Option | Description |