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)
| host | wall(s) | peak(MB) | frames | elems | validJSON | match(N) |
| nm_assemblyscript | 0.006 | 28 | 1 | 209715 | true | true |
| nm_c_wasi | 0.007 | 29 | 1 | 209715 | true | true |
| nm_tinygo_wasi | 0.007 | 29 | 1 | 209715 | true | true |
| nm_zig_wasi | 0.007 | 31 | 1 | 209715 | true | true |
| nm_rust_wasi | 0.008 | 29 | 1 | 209715 | true | true |
| nm_javy | 0.019 | 35 | 1 | 209715 | true | true |
| nm_go_wasi | 0.020 | 40 | 1 | 209715 | true | true |
| nm_cpp_wasi | 0.022 | 30 | 1 | 209715 | true | true |
~64.00 MiB — Array(13421760)
| host | wall(s) | peak(MB) | frames | elems | validJSON | match(N) |
| nm_zig_wasi | 0.089 | 94 | 65 | 13421760 | true | true |
| nm_c_wasi | 0.100 | 92 | 65 | 13421760 | true | true |
| nm_rust_wasi | 0.103 | 92 | 65 | 13421760 | true | true |
| nm_assemblyscript | 0.105 | 158 | 65 | 13421760 | true | true |
| nm_go_wasi | 0.116 | 166 | 65 | 13421760 | true | true |
| nm_javy | 0.124 | 98 | 65 | 13421760 | true | true |
| nm_tinygo_wasi | 0.139 | 156 | 65 | 13421760 | true | true |
| nm_cpp_wasi | 0.647 | 93 | 65 | 13421760 | true | true |
Generated 2026-07-05T16:27:04.543Z by ci/benchmark.mjs · each table sorted fastest first.