Minimal package for testing Swift Argument Parser in Webassembly using SwiftWasm.
- A recent SwiftWasm toolchain, e.g. SwiftWasm 5.5.
- A WebAssembly runtime, such as Wasmer, wasmtime or Wasm3.
/Library/Developer/Toolchains/swift-wasm-5.5.0-RELEASE.xctoolchain/usr/bin/swift build --triple wasm32-unknown-wasi -Xswiftc -lFoundation -Xswiftc -lCoreFoundation -Xswiftc -licui18n -c release
wasmer .build/wasm32-unknown-wasi/release/use-argument-parser.wasm -- hello -c 3
# or
wasmtime .build/wasm32-unknown-wasi/release/use-argument-parser.wasm hello -c 3
# or
wasm3 build/wasm32-unknown-wasi/release/use-argument-parser.wasm hello -c 3