#blockchain #parity-wasm #parity #wasm

nightly no-std pwasm-std

Parity WebAssembly standard library for contract development

21 releases (12 breaking)

Uses old Rust 2015

0.13.1 Mar 7, 2019
0.13.0 Nov 12, 2018
0.12.0 Nov 9, 2018
0.10.0 Jul 25, 2018
0.2.0 Nov 22, 2017

#34 in #parity-wasm

Download history 3/week @ 2024-03-19 7/week @ 2024-03-26 53/week @ 2024-04-02 2/week @ 2024-04-09 2/week @ 2024-04-16 5/week @ 2024-04-23 5/week @ 2024-05-07 4/week @ 2024-05-14 11/week @ 2024-05-21 7/week @ 2024-05-28 4/week @ 2024-06-04 7/week @ 2024-06-11 6/week @ 2024-06-18 5/week @ 2024-06-25 48/week @ 2024-07-02

67 downloads per month
Used in 3 crates

MIT/Apache

16KB
228 lines

pwasm-std

Parity WASM contracts standard library for Rust

Build Status

Documentation

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

[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.

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.

Dependencies

~380–670KB