Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bindings overview

machbus is Rust-first, and both the C and Python bindings are now built on the session facade. They wrap the sans-IO Session core: you drive the node explicitly by feeding received CAN frames, ticking a millisecond clock, and draining the frames and events it wants to emit. There is no hidden bus or internal IO; the binding hands you bytes and you move them.

Reach for a binding when you have:

  • a C application that needs machbus through an ABI-stable boundary,
  • Python tooling that needs demos, tests, or integration scripts,
  • a product that uses Rust internally but exposes a C ABI to another runtime.

Both surfaces expose the same model:

  • one node behind a single object (MachbusSession* in C, machbus.Session in Python),
  • subsystems plugged in at construction (diagnostics, GNSS, implement, VT client, TC client),
  • a four-step drive loop: feed inbound frames, tick the clock, drain poll_transmit, drain poll_event.

Read C ABI for the machbus_session_* surface, Python for the machbus.Session class, and ABI stability for the versioning contract.