Wasmtime —— WebAssembly 和 WASI 的小型高效运行时
Wasmtime 是 WebAssembly 和 WASI 的小型高效运行时,采用 Rust 编写,构建于编译器 Cranelift 之上。Wasmtime 完全开源,符合 WASI 标准,还支持与 C/C++、Python、.NET、Go 和其他编程语言集成,可运行在 Windows/Linux/macOS 等平台。
Wasmtime 在 Web 外部运行 WebAssembly 代码,既可以用作命令行实用程序,也可以用作更大应用程序中嵌入的库。
特性
轻量级。Wasmtime是WebAssembly的独立运行时,可根据您的需求进行扩展。它适合于微型芯片,也可以使用大型服务器。 Wasmtime也可以嵌入几乎所有应用程序中。快。Wasmtime建立在优化的编译器Cranelift之上,可在运行时快速生成高质量的机器代码。可配置。无论您是需要提前预编译wasm,使用Lightbeam快速生成代码还是在运行时进行解释,Wasmtime都能满足您执行wasm的所有需求。WASI。Wasmtime支持一组丰富的API,用于通过WASI标准与主机环境进行交互。标准。Wasmtime通过了官方的WebAssembly测试套件,实现了wasm的官方C API,并且还实现了WebAssembly的proposals。 Wasmtime开发人员也一直与WebAssembly标准流程密切相关。
目前支持如下语言:
- Rust - the
wasmtimecrate - C - the
wasm.h,wasi.h, andwasmtime.hheaders, CMake orwasmtimeConan package - C++ - the
wasmtime-cpprepository or usewasmtime-cppConan package - Python - the
wasmtimePyPI package - .NET - the
WasmtimeNuGet package - Go - the
wasmtime-gorepository