Rust server, Node client
cargo run --manifest-path rust/node-ipc/Cargo.toml \
--example nodeRustInterop -- server
node rust/node-ipc/examples/nodeRustInterop/node-peer.js clientNode.js ↔ Rust
Normal Node.js and Rust messages share the same UTF-8 JSON event envelope and configured delimiter. The focused suite exercises each runtime as both client and server.
{"type":"app.request","data":{"sequence":0,"payload":"xxxxxxxxxxxxxxxxx"}}\fThe default delimiter is form feed. Both peers validate the envelope, event type, payload, sequence, role and language metadata, every response, and final frame counts. TCP is the maintained mixed-runtime interoperability lane for 14.0.0.
cargo run --manifest-path rust/node-ipc/Cargo.toml \
--example nodeRustInterop -- server
node rust/node-ipc/examples/nodeRustInterop/node-peer.js clientnode rust/node-ipc/examples/nodeRustInterop/node-peer.js server
cargo run --manifest-path rust/node-ipc/Cargo.toml \
--example nodeRustInterop -- clientEach peer prints the exact sent and received frame. The visible \f represents the delimiter; this example reports no timing claim.
node rust/node-ipc/interop/vanilla-test.jsThe suite builds the dependency-free Rust TCP peer once, then runs Node client → Rust server and Rust client → Node server. It owns bounded startup, process deadlines, response validation, termination, and reap checks.
| Value or state | Shared contract |
|---|---|
| Normal objects, arrays, strings, booleans, null | Portable when both peers use the same event and delimiter configuration |
| Numbers | Use strings or JavaScript-safe integers when exact precision must survive both runtimes |
| Duplicate object members | Avoid them; Rust retains them while Node collapses to the last value |
| Lone UTF-16 surrogates | Avoid them; Rust strings require Unicode scalar values |
| Malformed or incomplete frames | Rust deliberately fails closed in cases where Node may normalize or discard trailing state |
| Custom delimiter | Configure identical valid UTF-8 bytes and keep that sequence out of serialized envelopes |
A valid frame does not identify its sender. Use verified mTLS or a separately authenticated local boundary, then authorize application events and validate payload schemas.
The repository also contains a release-mode TCP round-trip harness for Node/Node, Rust/Rust, and both mixed role directions. It records payload, warm-up, count, pipeline depth, runtime versions, memory, package footprint, environment, and cleanup. Correctness tests use debug builds and make no performance claim.
npm run benchmark:rust:test
npm run benchmark:rust:quickThere is no browser JavaScript adapter, Rust WASM ABI, WASM build, or browser interoperability suite in 14.0.0. Browser and WASM behavior is not claimed.