owasm-std

Crates.ioowasm-std
lib.rsowasm-std
version0.20.1
sourcesrc
created_at2018-11-12 00:57:01.997457
updated_at2019-02-24 05:53:54.263435
descriptionA standard library for interacting with the Oasis platform.
homepage
repositoryhttps://github.com/oasislabs/owasm-std.git
max_upload_size
id96166
size28,381
(david-yan)

documentation

README

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
Commit count: 268

cargo fmt