Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11,430 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Idena compatibility fork

This repository is a hardened compatibility fork of Wasmer 2.3.0 for the Idena smart-contract runtime. It is not the current general-purpose Wasmer release, and this fork publishes no CLI packages or binaries. The installation commands later in this README install official Wasmer, not this code.

idena-wasm pins a reviewed commit from this repository and enables only the compiler, universal engine, Singlepass, middleware, and type surfaces required for Idena contract execution. Do not replace that pin with this repository's moving default branch.

What was updated

  • Cranelift, stale optional engines, advisory-bearing optional packages, and unused workspace members were removed from the Idena build path.
  • WASI sandbox boundaries, C/Go FFI pointer validation, VM function-pointer handling, signal state, allocation limits, and modern-Rust compatibility were hardened.
  • Compatible Rust dependencies and workflow actions were refreshed without changing the public Wasmer 2.3 crate version used by Idena.
  • Fork CI checks the core API, Singlepass compiler, universal engine, C API, headless CLI, VM tests, formatting, warnings relevant to unsafe legacy patterns, and cargo audit.

Benefits

  • A much smaller legacy runtime surface than building all Wasmer 2.3 engines and integrations.
  • Backported security and correctness fixes while retaining the API expected by the existing Idena Wasm wrapper.
  • Current compiler diagnostics expose unsafe assumptions that older Rust toolchains did not report.

Risks and tradeoffs

  • This is still a legacy Wasmer 2.3 architecture. It does not automatically receive fixes from current Wasmer releases, and backports can be incomplete.
  • Runtime changes are consensus-sensitive when consumed by Idena. A different engine, compiler, metering path, trap, or floating-point result can split contract execution between nodes.
  • The repository default branch can advance beyond the revision used by idena-wasm. Only the exact commit in idena-wasm/Cargo.toml is part of the reviewed runtime set.
  • The focused Idena checks pass on current Rust, but legacy crates still emit non-fatal lifetime-syntax and unused-import warnings. The entire historical workspace is not clean under a global -D warnings policy.
  • Reduced features improve auditability but make this fork unsuitable as a drop-in replacement for applications that require LLVM, Cranelift, full Emscripten/WASI support, or the latest WebAssembly proposals.

Validate the Idena subset

Use the same Rust toolchain as the consuming idena-wasm revision, then run the commands maintained in .github/workflows/fork-ci.yml. At minimum:

cargo fmt --all -- --check
cargo check -p wasmer --no-default-features --features compiler,universal,singlepass
cargo test -p wasmer-vm --lib
cargo audit

The authoritative integration test is a locked idena-wasm build followed by the binding and full idena-go test suites.

Wasmer is a fast and secure WebAssembly runtime that enables super lightweight containers to run anywhere: from Desktop to the Cloud, Edge and IoT devices.

This document is also available in: πŸ‡¨πŸ‡³ δΈ­ ζ–‡ -Chinese β€’ πŸ‡©πŸ‡ͺ Deutsch-German β€’ πŸ‡ͺπŸ‡Έ EspaΓ±ol-Spanish β€’ πŸ‡«πŸ‡· FranΓ§ais-French β€’ πŸ‡―πŸ‡΅ ζ—₯本 θͺž -Japanese β€’ πŸ‡°πŸ‡· ν•œκ΅­μΈ -Korean.

Features

  • Secure by default. No file, network, or environment access, unless explicitly enabled.
  • Supports WASI and Emscripten out of the box.
  • Fast. Run WebAssembly at near-native speeds.
  • Embeddable in multiple programming languages
  • Compliant with latest WebAssembly Proposals (SIMD, Reference Types, Threads, ...)

Install

Wasmer CLI ships as a single executable with no dependencies.

The commands in this section install the official Wasmer distribution. They do not install the Idena compatibility fork described above.

curl https://get.wasmer.io -sSfL | sh
Other installation options (Powershell, Brew, Cargo, ...)

Wasmer can be installed from various package managers. Choose the one that fits best for your environment:

  • Powershell (Windows)

    iwr https://win.wasmer.io -useb | iex
  • Homebrew (macOS, Linux)

    brew install wasmer
  • Scoop (Windows)

    scoop install wasmer
  • Chocolatey (Windows)

    choco install wasmer
  • Cargo

    Note: All the available features are described in the wasmer-cli crate docs

    cargo install wasmer-cli

Looking for more installation options? See the wasmer-install repository to learn more!

Quickstart

You can start by running QuickJS, a small and embeddable Javascript engine compiled as a WebAssembly module (qjs.wasm):

$ wasmer qjs.wasm
QuickJS - Type "\h" for help
qjs > const i = 1 + 2;
qjs > console.log("hello " + i);
hello 3

Here is what you can do next:

πŸ“¦ Language Integrations

The Wasmer runtime can be used as a library embedded in different languages, so you can use WebAssembly anywhere.

Language Package Documentation
Rust logo Rust wasmer Rust crate Learn
C logo C wasm.h header Learn
C++ logo C++ wasm.hh header Learn
C# logo C# WasmerSharp NuGet package Learn
D logo D wasmer Dub package Learn
Python logo Python wasmer PyPI package Learn
JS logo Javascript @wasmerio NPM packages Learn
Go logo Go wasmer Go package Learn
PHP logo PHP wasm PECL package Learn
Ruby logo Ruby wasmer Ruby Gem Learn
Java logo Java wasmer/wasmer-jni Bintray package Learn
Elixir logo Elixir wasmex hex package Learn
R logo R no published package Learn
Postgres logo Postgres no published package Learn
Swift logo Swift no published package
Zig logo Zig no published package
Dart logo Dart wasm pub package
Crystal logo Crystal no published package Learn
Lisp logo Lisp no published package
Julia logo Julia no published package
VLang logo V no published package

πŸ‘‹Β Β Missing a language?

Contribute

We appreciate your help! πŸ’œ

We recommend reading the following guide on how to contribute into a complex project successfully: https://mitchellh.com/writing/contributing-to-complex-projects

Check our docs on how to build Wasmer from source or test your changes.

Community

Wasmer has an amazing community of developers and contributors. Welcome, please join us! πŸ‘‹

About

πŸš€ The leading WebAssembly Runtime supporting WASI and Emscripten

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages