MCPcopy Index your code
hub / github.com/alttch/busrt

github.com/alttch/busrt @v0.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.0 ↗ · + Follow
599 symbols 1,305 edges 54 files 76 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BUS/RT - Rust-native IPC broker crates.io page docs.rs page GitHub Actions CI

What is BUS/RT

BUS/RT® is a Rust-native IPC broker, written in Rust/Tokio, inspired by NATS, ZeroMQ and Nanomsg. BUS/RT is fast, flexible and very easy to use, optimized for both high-load and ultra-low latency real-time scenarios.

The library can be embedded in any Rust project or be used as a standalone server.

BUS/RT is the core bus of EVA ICS v4.

Inter-process communication

The following communication patterns are supported out-of-the-box:

  • one-to-one messages
  • one-to-many messages
  • pub/sub

The following channels are supported:

  • async channels between threads/futures (Rust only)
  • UNIX sockets (local machine, Linux/BSD)
  • TCP sockets (Linux/BSD/Windows)

In addition to Rust, BUS/RT has also bindings for the following languages:

Rust crate: https://crates.io/crates/busrt

Real-time safety

Use rt feature to use for internal mutexes parking_lot_rt - a parking_lot fork without spin-locks, which is real-time safe.

Technical documentation

The full documentation is available at: https://info.bma.ai/en/actual/busrt/

Some numbers

Benchmarks

CPU: i7-7700HQ

Broker: 4 workers, clients: 8, payload size: 100 bytes, local IPC (single unix socket), totals:

stage iters/s
rpc.call 126_824
rpc.call+handle 64_694
rpc.call0 178_505
send+recv.qos.no 1_667_131
send+recv.qos.processed 147_812
send.qos.no 2_748_870
send.qos.processed 183_795

About the authors

Bohemia Automation / Altertech is a group of companies with 15+ years of experience in the enterprise automation and industrial IoT. Our setups include power plants, factories and urban infrastructure. Largest of them have 1M+ sensors and controlled devices and the bar raises higher and higher every day.

Extension points exported contracts — how you extend this code

RpcHandlers (Interface)
(no doc) [7 implementers]
src/rpc/async_client.rs
FrameInterface (Interface)
@ignore [4 implementers]
bindings/js/busrt/src/busrt.ts
AsyncClient (Interface)
(no doc) [2 implementers]
src/client.rs
Socket (Interface)
(no doc) [2 implementers]
src/sync/ipc.rs
IntoBusRtResult (Interface)
(no doc) [1 implementers]
src/lib.rs
Cursor (Interface)
(no doc) [1 implementers]
src/cursors.rs
ToDebugString (Interface)
(no doc) [1 implementers]
src/cli.rs
AsyncAllocator (Interface)
(no doc)
src/broker.rs

Core symbols most depended-on inside this repo

lock
called by 76
bindings/js/busrt/src/busrt.ts
len
called by 36
src/borrow.rs
next
called by 22
src/cursors.rs
is_empty
called by 21
src/borrow.rs
payload
called by 19
src/lib.rs
to_vec
called by 18
src/borrow.rs
read_exact
called by 17
bindings/python/busrt/busrt/client.py
from
called by 15
src/lib.rs

Shape

Method 390
Class 96
Function 84
Enum 17
Interface 12

Languages

Rust67%
Python21%
TypeScript12%

Modules by API surface

src/broker.rs99 symbols
bindings/js/busrt/src/busrt.ts62 symbols
src/sync/ipc.rs37 symbols
src/ipc.rs36 symbols
src/cli.rs32 symbols
bindings/python/busrt/busrt/rpc.py30 symbols
src/lib.rs29 symbols
bindings/python/busrt_async/busrt_async/rpc.py28 symbols
src/rpc/mod.rs26 symbols
src/rpc/async_client.rs24 symbols
src/tools/pubsub.rs21 symbols
src/cursors.rs21 symbols

Datastores touched

testsDatabase · 1 repos

For agents

$ claude mcp add busrt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact