Native Messaging WASI host benchmark

Each host is sent a Native Messaging protocol frame (4-byte LE length + UTF-8 JSON) carrying Array(N) over stdin under wasmtime; the echoed frames are validated as JSON and the round-trip is timed. Headless equivalent of the connectNative benchmark in test_wasi.js. Two sizes: ~1 MiB (a typical message) and ~64 MiB (Native Messaging extension→host maximum). Lower wall(s) is faster; peak(MB) is the host process's peak RSS — at 64 MiB it separates streaming hosts (flat memory) from those that hold the whole body. Best of 3 runs.

~1.00 MiB — Array(209715)

hostwall(s)peak(MB)frameselemsvalidJSONmatch(N)
nm_c_wasi0.005211209715truetrue
nm_assemblyscript0.006211209715truetrue
nm_js2wasm0.006221209715truetrue
nm_tinygo_wasi0.006221209715truetrue
nm_rust_wasi0.007221209715truetrue
nm_zig_wasi0.007241209715truetrue
nm_javy0.018291209715truetrue
nm_cpp_wasi0.020231209715truetrue
nm_go_wasi0.022331209715truetrue

~64.00 MiB — Array(13421760)

hostwall(s)peak(MB)frameselemsvalidJSONmatch(N)
nm_c_wasi0.095856513421760truetrue
nm_zig_wasi0.096886513421760truetrue
nm_rust_wasi0.112856513421760truetrue
nm_assemblyscript0.1211506513421760truetrue
nm_go_wasi0.1251596513421760truetrue
nm_javy0.130916513421760truetrue
nm_tinygo_wasi0.1641496513421760truetrue
nm_js2wasm0.271236513421760truetrue
nm_cpp_wasi0.772866513421760truetrue

Generated 2026-06-14T14:26:41.644Z by ci/benchmark.mjs · each table sorted fastest first.