• Stars
    star
    102
  • Rank 335,495 (Top 7 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ewasm API for Rust

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.11"

Make sure the project is a library of cdylib type:

[lib]
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:

#[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.11"
default-features = false
features = ["std", "qimalloc"]

Further documentation is available here.

Author(s)

Alex Beregszaszi, Jake Lang

License

Apache 2.0

More Repositories

1

design

Ewasm Design Overview and Specification
1,015
star
2

hera

Hera: Ewasm virtual machine conforming to the EVMC API
C++
180
star
3

evm2wasm

[ORPHANED] Transcompiles EVM code to eWASM
C++
107
star
4

scout

Scout is a Ethereum 2.0 Phase 2 execution prototyping engine.
Rust
89
star
5

wasm-metering

[ORPHANED] Injects metering into webassembly binaries
JavaScript
68
star
6

testnet

Testnet planning & documentation
Dockerfile
64
star
7

ewasm-precompiles

Implementation of the Ethereum precompiled contracts in Rust.
Rust
45
star
8

wasm-json-toolkit

[ORPHANED] A small toolkit for converting wasm binaries into json and back.
JavaScript
32
star
9

ewasm-kernel

[ORPHANE] Javascript implementation of an eWASM VM
JavaScript
24
star
10

assemblyscript-ewasm-api

Ewasm API for AssemblyScript
TypeScript
21
star
11

biturbo

Eth1 EE using Turboproofs
TypeScript
20
star
12

rust-ewasm

[ORPHANE] Examples of compiling Rust code to ewasm contracts
WebAssembly
20
star
13

wast2wasm

[OBSOLETE] converts .wast files -> .wasm
JavaScript
20
star
14

benchmarking

Instructions for benchmarking Ewasm precompiles. (And results.)
Python
18
star
15

ewasm-studio

A lightweight development environment for eWASM
JavaScript
16
star
16

wrc20-examples

This repository contains examples of WRC20 tokens written in different languages.
12
star
17

sentinel-rs

Validator and metering injector for Ewasm
Rust
11
star
18

pm

Ewasm project management repository
11
star
19

ethereum-bls12.rs

Ethereum serialisation for BLS12-381 operations in Rust.
Rust
10
star
20

eth1x64

Description and examples for different variants under the Eth1x64 experiment.
8
star
21

scout.ts

TypeScript port of Scout
TypeScript
7
star
22

ethereum-bn128.rs

Ethereum's BN128 helpers for Rust.
Rust
7
star
23

scoutone

ScoutOne is a C++ library implementing the Eth 2 Phase 2 execution environment on top of wabt.
CMake
6
star
24

evm2wasm-frontend

[ORPHANE] an html front-end for evm2wasm
JavaScript
5
star
25

ewasm-cleanup

[OBSOLETE] Cleanup eWASM contracts to satisfy the specification
JavaScript
4
star
26

sentinel-governance

Governance prototype for the Sentinel contract
JavaScript
4
star
27

ewasm-explorer

[ORPHANE] Minimal account explorer for ewasm testnet.
JavaScript
2
star
28

hera.rs

Rust
2
star
29

ewasm-testgen

Random test case generator for Ewasm.
JavaScript
2
star
30

wasm-metering-old

[OBSOLETE] This is a prototype to inject metering into wasm code.
JavaScript
2
star
31

awesome-phase2

A curated list of awesome things related to Eth2 Phase2
2
star
32

ce-playground

This is a loose collection of Eth 2.0 Phase 2 Computational Environments (CE).
1
star
33

evm384_f6m_mul

Shell
1
star
34

docker

Docker sources useful for Ewasm
Dockerfile
1
star
35

ewasm-libc

1
star
36

ewasm-tests

[OBSOLETE] Tests.
1
star