example-package-fisheryates
example-package-fisheryates copied to clipboard
Add support for SwiftWasm
Use WASILibc module for random when running in SwiftWasm.
How to run
- Install a recent SwiftWasm toolchain.
- Clone the Dealer package:
git clone https://github.com/apple/example-package-dealer.git
- Using the SwiftWasm toolchain, build the package:
cd example-package-dealer
swift build -c release --triple wasm32-unknown-wasi
- Install a runtime such as Wasmer.
- Run the WebAssembly module:
wasmer .build/wasm32-unknown-wasi/release/Dealer.wasm