Skip to content
Ewasm API for Rust
Branch: master
Clone or download
Latest commit c14dcf7 Nov 27, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo Set default target Jan 27, 2019
src Add debug::log(&str) helper Sep 10, 2019
.gitignore Initial prototype Jun 25, 2018
Cargo.toml Bump version to 0.11.0 Nov 27, 2019
LICENSE Initial prototype Jun 25, 2018 Bump version to 0.11.0 Nov 27, 2019
circle.yml Add more test cases to circleci Jul 1, 2019


Build Version

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


Add the dependency, as usual:

ewasm-api = "0.11"

Make sure the project is a library of cdylib type:

crate-type = ["cdylib"]

In your project, include the prelude:

use ewasm_api::prelude::*;

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

extern crate ewasm_api;

use ewasm_api::prelude::*;

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


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:

version = "0.11"
default-features = false
features = ["std", "qimalloc"]

Further documentation is available here.


Alex Beregszaszi, Jake Lang


Apache 2.0

You can’t perform that action at this time.