Cross-Language Interop
The examples/cross-language/ directory demonstrates Rust and Node.js exchanging binary data through Vexil-encoded .vxb files.
How it works
- A shared
.vexilschema defines the data types - The Rust program encodes data to a
.vxbbinary file - The Node.js program reads the same
.vxbfile and decodes it - Both sides produce and consume byte-identical wire format
This works because all Vexil backends (Rust, TypeScript, Go) implement the same deterministic encoding rules, verified by compliance vectors.
Running
cd examples/cross-language
# Build and run the Rust encoder
cd rust-device
cargo run
# Run the Node.js decoder
cd ../node-reader
npm install
npm start