Giter VIP home page Giter VIP logo

wasmtime's Introduction

Wasmtime: a WebAssembly Runtime.

Wasmtime is a standalone wasm-only runtime for WebAssembly, using the Cranelift JIT.

It runs WebAssembly code outside of the Web, and can be used both as a command-line utility or as a library embedded in a larger application.

Build Status Gitter chat Minimum rustc 1.37

Wasmtime passes the WebAssembly spec testsuite, and supports a new system API proposal called WebAssembly System Interface, or WASI.

Wasmtime includes a git submodule; in order to build it, it's necessary to obtain a full checkout, like this:

git clone --recurse-submodules https://github.com/CraneStation/wasmtime.git

To build an optimized version of Wasmtime, use Cargo:

cargo build --release

There are Rust, C, and C++ toolchains that can compile programs with WASI. See the WASI intro for more information, and the WASI tutorial for a tutorial on compiling and running programs using WASI and wasmtime, as well as an overview of the filesystem sandboxing system.

Wasmtime does not yet implement Spectre mitigations, however this is a subject of ongoing research.

Additional goals for Wasmtime include:

  • Support a variety of host APIs (not just WASI Core), with fast calling sequences, and develop proposals for additional API modules to be part of WASI. Reference Sysroot.
  • Implement the proposed WebAssembly C API.
  • Facilitate testing, experimentation, and development around the Cranelift and Lightbeam JITs.
  • Develop a native ABI used for compiling WebAssembly suitable for use in both JIT and AOT to native object files.

Including Wasmtime in your project

Wasmtime exposes an API for JIT compilation through the wasmtime-jit subcrate, which depends on wasmtime-environ and wasmtime-runtime for the ABI and runtime support respectively. However, this API is not documented and subject to change. Please use at your own risk!

Build the individual crates as such:

cargo build --package wasmtime-jit

Wasmtime does not currently publish these crates on crates.io. They may be included as a git dependency, like this:

[dependencies]
wasmtime-environ = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }
wasmtime-runtime = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }
wasmtime-jit = { git = "https://github.com/CraneStation/wasmtime", rev = "somecommithash" }

All three crates must be specified as dependencies for wasmtime-jit to build correctly, at the moment.

It's Wasmtime.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.