paritytech/pwasm-std

Name: pwasm-std

Owner: Parity Technologies

Description: WASM contracts standard library for Rust

Created: 2017-08-09 14:37:53.0

Updated: 2018-05-22 11:19:42.0

Pushed: 2018-05-18 12:03:38.0

Homepage: null

Size: 677

Language: Rust

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

pwasm-std

Parity WASM contracts standard library for Rust

Build Status

Documentation

Parity Wasm Tutorial - a full fledged tutorial on how to write contracts in Webassembly for Kovan and other Wasm-enabled networks.

pwasm-std is a limited subset of the Rust standard library, along with a custom allocator which delegates the allocation to the runtime-defined externs.

Use

Just add a dependency

endencies]
m-std = "0.7"

The crate is supposed to be used on nightly Rust only, until the custom allocator api stablizes in Rust.

no_std

pwasm-std is itself compiled with no_std and expected to be used within no_std-crates/binaries, since it defines lang_item-s on it's own, which will conflict with standard library.

But for test scenarios it can be compiled with feature “std” and auxiliary crate “pwasm-test” to support testing of contracts' internal logic.

License

pwasm-std is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your choice.

See LICENSE-APACHE, and LICENSE-MIT for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in pwasm-std by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.