/use-argument-parser

Test swift-argument-parser in SwiftWasm

Primary LanguageSwift

use-argument-parser

Minimal package for testing Swift Argument Parser in Webassembly using SwiftWasm.

Requirements

Build and Run

/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