9 releases (breaking)

✓ Uses Rust 2018 edition

0.10.0 Jul 1, 2019
0.9.0 May 28, 2019
0.8.0 Apr 15, 2019
0.7.0 Feb 14, 2019
0.4.0 Nov 29, 2018

#100 in Cryptocurrencies

Download history 24/week @ 2019-03-18 115/week @ 2019-03-25 18/week @ 2019-04-01 12/week @ 2019-04-08 14/week @ 2019-04-15 18/week @ 2019-04-22 3/week @ 2019-04-29 12/week @ 2019-05-06 26/week @ 2019-05-13 58/week @ 2019-05-20 43/week @ 2019-05-27 31/week @ 2019-06-03 46/week @ 2019-06-10 41/week @ 2019-06-17 107/week @ 2019-06-24

141 downloads per month

Apache-2.0

34KB
769 lines

ewasm-rust-api

Build Version

This project aims to give a low-level and a high-level binding to ewasm from Rust.

Usage

Add the dependency, as usual:

[dependencies]
ewasm-api = "0.10"

In your project, include the prelude:

use ewasm_api::prelude::*;

Additionally there is support for some macros to make creating contracts easier:

#[macro_use]
extern crate ewasm_api;

use ewasm_api::prelude::*;

fn entry() {
    // The actual contract code goes here.
}

ewasm_entry_point!(entry);

Other modules are available as well, outside of the prelude. Refer to the documentation for more info.

ewasm-rust-api builds with various feature sets:

  • default: Builds with wee_alloc as the global allocator and with the Rust standard library.
  • qimalloc: Builds with qimalloc as the global allocator.
  • debug: Exposes the debugging interface.
  • experimental: Exposes the experimental bignum system library API.

To enable specific features include the dependency as follows:

[dependencies.ewasm_api]
version = "0.10"
default-features = false
features = ["std", "qimalloc"]

Further documentation is available here.

Author(s)

Alex Beregszaszi, Jake Lang

License

Apache 2.0

Dependencies

~606KB