2 releases
0.0.12 | Mar 30, 2020 |
---|---|
0.0.10 | Mar 24, 2020 |
#644 in Build Utils
25KB
691 lines
Faasm-sys
Rust bindings for Faasm.
Build
Normal mode
Running the following will:
- Download faasm libs and store them in
vendor
- Include the
bindings.rs
file invendor
in the library - Build the Wasm library
cargo build --target wasm32-unknown-unknown
Local development mode
If you set the FAASM_SYS_DEV
environment variable before building, then the build script will fetch libraries according to the Faasm local development defaults. You can then run the test script as well:
env FAASM_SYS_DEV=1 cargo build --target wasm32-unknown-unknown
./bin/test.sh
Note that when used as a submodule of rust-faasm,
the target
directory is directed one level up.
Publish
Since by default cargo tries to package the downloaded files in the build script and there is no
reason we should do this, you should publish in local dev mode FAASM_SYS_DEV
only.
set -x FAASM_SYS_DEV 1
cargo publish --target wasm32-unknown-unknown
No runtime deps
~0–1.9MB
~28K SLoC