#oasis #owasm #platform #standard #contract #create #panic

owasm-std

A standard library for interacting with the Oasis platform

8 unstable releases (3 breaking)

0.20.1 Feb 24, 2019
0.20.0 Feb 24, 2019
0.13.0 Nov 15, 2018
0.12.2 Nov 14, 2018
0.10.1 Nov 14, 2018

#8 in #oasis

29 downloads per month
Used in 4 crates

MIT/Apache

16KB
339 lines

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

  1. Add oasis = { git = "https://github.com/oasislabs/oasis-rs" } to your contract's Cargo.toml. Pass features = ["platform-alloc"] to use the Oasis platform allocator.
  2. Copy Xargo.toml to your contract crate root
  3. xargo build --target=wasm32-unknown-unknown
  4. business as usual

Dependencies

~0.7–1.3MB
~29K SLoC