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_warpo0.007291209715truetrue
nm_assemblyscript0.008291209715truetrue
nm_c_wasi0.008291209715truetrue
nm_tinygo_wasi0.008291209715truetrue
nm_zig_wasi0.008311209715truetrue
nm_rust_wasi0.009291209715truetrue
nm_javy0.023351209715truetrue
nm_go_wasi0.024401209715truetrue
nm_cpp_wasi0.027301209715truetrue

~64.00 MiB — Array(13421760)

hostwall(s)peak(MB)frameselemsvalidJSONmatch(N)
nm_c_wasi0.117926513421760truetrue
nm_zig_wasi0.123946513421760truetrue
nm_warpo0.1251576513421760truetrue
nm_rust_wasi0.135926513421760truetrue
nm_assemblyscript0.1391586513421760truetrue
nm_go_wasi0.1461666513421760truetrue
nm_javy0.1591006513421760truetrue
nm_tinygo_wasi0.1771566513421760truetrue
nm_cpp_wasi0.843926513421760truetrue

Generated 2026-09-29T13:49:59.320Z by ci/benchmark.mjs · each table sorted fastest first.