owasm-std
A crate of utilities for developing programs for the Oasis platform.
The Xargo.toml
can be used to create a custom Rust libstd
that has wasm syscalls enabled.
This allows using println!
and panic!
directly without creating custom extern fns.
Compile using --target=wasm32-unknown-unknown
to use Rust implementaitons for symbols like
memcpy
; use --target=wasm32-unknown-emscripten
to use platform-provided versions.
Usage
- Add
oasis = { git = "https://github.com/oasislabs/oasis-rs" }
to your contract's Cargo.toml. Passfeatures = ["platform-alloc"]
to use the Oasis platform allocator. - Copy
Xargo.toml
to your contract crate root xargo build --target=wasm32-unknown-unknown
- business as usual