Showcase SwiftWasm code that's impossible to accomplish without Asyncify method:
- Sleeping inside synchronous code, without resorting to callback (or Swift Next's async/await).
- An initializer (which needs to return synchronously) that depends on asynchronous code from the outside world.
- Install the SwiftWasm toolchain
- Set SwiftWasm's
swiftas default or edit the swift command inbuild.sh. - Install the Binaryen toolchain (we'll use the
wasm-opttool from there). - Set Binaryen's
/binin PATH or edit the wasm-opt command inbuild.sh.
npm install
npm run build./build.shOutput files are written to /dist folder.