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_assemblyscript0.006281209715truetrue
nm_c_wasi0.007291209715truetrue
nm_tinygo_wasi0.007291209715truetrue
nm_zig_wasi0.007311209715truetrue
nm_rust_wasi0.008291209715truetrue
nm_javy0.019351209715truetrue
nm_go_wasi0.020401209715truetrue
nm_cpp_wasi0.022301209715truetrue

~64.00 MiB — Array(13421760)

hostwall(s)peak(MB)frameselemsvalidJSONmatch(N)
nm_zig_wasi0.089946513421760truetrue
nm_c_wasi0.100926513421760truetrue
nm_rust_wasi0.103926513421760truetrue
nm_assemblyscript0.1051586513421760truetrue
nm_go_wasi0.1161666513421760truetrue
nm_javy0.124986513421760truetrue
nm_tinygo_wasi0.1391566513421760truetrue
nm_cpp_wasi0.647936513421760truetrue

Generated 2026-07-05T16:27:04.543Z by ci/benchmark.mjs · each table sorted fastest first.