WeSearch

Wasmrt: Portable, lightweight and embeddable WebAssembly runtime in C

·4 min read · 0 reactions · 0 comments · 10 views
#webassembly#programming#software
Wasmrt: Portable, lightweight and embeddable WebAssembly runtime in C
⚡ TL;DR · AI summary

Wasmrt is a portable and lightweight WebAssembly runtime designed for embedding in C projects. It supports WASI preview1 and allows for the execution of sandboxed plugins and scripts. The runtime requires Clang and wasm-ld for building and includes various features for handling WebAssembly modules.

Key facts
Original article
GitHub
Read full at GitHub →
Opening excerpt (first ~120 words) tap to expand

wasmrt A portable, lightweight, single-header WebAssembly runtime with full WASI preview1 support. It targets the use case of embedding a WASM interpreter in a C project to run sandboxed plugins, scripts or portable modules. Building make # builds wasmrt / wasmrt.exe make wasm # compiles all test/*.c to test/*.wasm make test # runs the test suite make clean Requires Clang and wasm-ld. On Linux, clang + lld. On Windows, set CC in the Makefile to the Clang path. Embedding One translation unit defines the implementation. All others include the header without the macro. #define WASMRT_IMPLEMENTATION #include "wasmrt.h" wasm_module and wasm_instance are large structs. Declare them static or allocate them on the heap, not on the stack.

Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from GitHub