tree: 37e43929ae87ad47b31489dc45dfe247f6182777 [path history] [tgz]
  1. main.rs
  2. README.md
vendor/rusqlite-0.32.1/examples/persons/README.md

Persons example

Run

$ cargo run --example persons

Run (wasm32-wasi)

Requisites

# Set to wasi-sdk directory
$ export WASI_SDK_PATH=`<wasi-sdk-path>`
$ export CC_wasm32_wasi="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
# Build
$ cargo build --example persons --target wasm32-wasi --release --features bundled
# Run
$ wasmtime target/wasm32-wasi/release/examples/persons.wasm
Found persons:
ID: 1, Name: Steven
ID: 2, Name: John
ID: 3, Name: Alex