/wasmtime-cpp

Primary LanguageC++Apache License 2.0Apache-2.0

wasmtime-cpp

C++ embedding of Wasmtime

A Bytecode Alliance project

CI status Documentation

Installation

To install the C++ API from precompiled binaries you'll need a few things;

  • First you'll want wasmtime's C API installed. This is easiest by downloading a precompiled release (an artifact with "c-api" in the name).

  • Next you'll want to copy include/wasmtime.hh into the directory with wasmtime.h from the C API.

Afterwards you can also consult the linking documentation for the C API to link Wasmtime into your project. Your C++ code will then use:

#include <wasmtime.hh>

Build Requirements

Wasmtime supports Windows, macOS, and Linux. Wasmtime also supports the AArch64 and x86_64 architectures.

The C++ header file here requires C++20 support, or the -std=c++20 flag for unix compilers.

Contributing

See CONTRIBUTING.md.