This crate provides a blockchain filesystem for use in a WASI Wasm runtime. The implementation is based on the Blockchain WASI proposal (link to high-level blog post).
You can find examples of using BCFS in src/lib/tests.rs
.
BCFS can be compiled to Wasm so that it can be used in integration tests.
Just build using cargo build --target wasm32-unknown-unknown
.
BCFS exposes FFI bindings so that it can be called from, say, JavaScript in the browser.
To build the bindings, you'll want to pass --features ffi
.