Continuous Integration | Test Coverage | Documentation | Crates.io |
---|---|---|---|
wasmi
was conceived as a component of parity-ethereum (ethereum-like contracts in wasm) and substrate. These projects are related to blockchain and require a high degree of correctness. The project is not trying to be be involved in any implementation of any of work-in-progress Wasm proposals. Instead the project tries to be as close as possible to the specification, therefore avoiding features that are not directly supported by the specification.
With all that said wasmi
should be a good option for initial prototyping and there shouldn't be a problem migrating from wasmi
to another specification compliant execution engine later on.
Clone wasmi
from our official repository and then build using the standard cargo
procedure:
git clone https://github.com/paritytech/wasmi.git
cd wasmi
cargo build
In order to test wasmi
you need to initialize and update the Git submodules using:
git submodule update --init --recursive
Alternatively you can provide --recursive
flag to git clone
command while cloning the repository:
git clone https://github.com/paritytech/wasmi.git ---recursive
After Git submodules have been initialized and updated you can test using:
cargo test
It is recommended to further specify --release
since compiling and testing without optimizations
usually is slower compared to compiling and testing with optimizations.
Supported platforms are primarily Linux, MacOS, Windows and WebAssembly.
Use the following command in order to produce a WebAssembly build:
cargo build --no-default-features --target wasm32-unknown-unknown
On 64-bit platforms we further provide cross-platform suppport for virtual memory usage.
For this build wasmi
using:
cargo build --features virtual_memory
In order to benchmark wasmi
use the following command:
cargo bench --manifest-path benches/Cargo.toml
wasmi
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 wasmi
by you, as defined in the APACHE 2.0 license, shall be
dual licensed as above, without any additional terms or conditions.