Crates.io | pwasm-std |
lib.rs | pwasm-std |
version | 0.13.1 |
source | src |
created_at | 2017-11-21 13:36:15.2197 |
updated_at | 2019-03-07 12:07:23.283077 |
description | Parity WebAssembly standard library for contract development |
homepage | https://github.com/paritytech/pwasm-std |
repository | https://github.com/paritytech/pwasm-std |
max_upload_size | |
id | 40131 |
size | 23,647 |
Parity WASM contracts standard library for Rust
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.
Just add a dependency
[dependencies]
pwasm-std = "0.13"
Test pwasm-std
with
cargo test --features=test
The crate is supposed to be used on nightly Rust only, until the custom allocator api stablizes in Rust.
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.
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.
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.