Finite native programs

Rust examples

Choose one transport and one behavior. Every runnable exchange validates its peer messages and exits after the expected work.

Choose a target

TCP

Basic request/reply, strict ordering, raw bytes, and multi-client broadcast.

Open TCP source →

UDP

Framed datagrams, raw datagrams, direct replies, and explicit peer fan-out.

Open UDP source →

TLS boundary

Wrap an application-supplied, already verified TLS stream without choosing a crypto stack.

Open TLS boundary →

Node + Rust

Run either language as TCP server or client and print the exact framed ping/pong messages.

Open mixed examples →

Run from the repository root

TCP request / reply

cargo run --manifest-path rust/node-ipc/Cargo.toml \
  --example TCPSocket -- basic server

# second terminal
cargo run --manifest-path rust/node-ipc/Cargo.toml \
  --example TCPSocket -- basic client

Local request / reply

cargo run --manifest-path rust/node-ipc/Cargo.toml \
  --example unixWindowsSocket -- basic server

# second terminal
cargo run --manifest-path rust/node-ipc/Cargo.toml \
  --example unixWindowsSocket -- basic client

PowerShell users can place each command on one line. Start the server before its client.

Behavior matrix

TargetSelectorsPlatforms
TCPSocketbasic, basicSync, rawBuffer, Multi-Client-BroadcastLinux, macOS, Windows
UDPSocketbasic, rawBuffer, Multi-Client-BroadcastLinux, macOS, Windows
unixWindowsSocketbasic, basicSync, rawBuffer, binaryRawBuffer, Multi-Client-BroadcastUnix socket or Windows named pipe
clusterUnixSocketserver, clientUnix only
TLSSocketPrints the verified-stream integration boundaryAny native target with caller-supplied TLS

Example boundaries