Section
Bindings
AI Access
Bindings
Drive the box from C, C++, or PythonA medius box sits inline between a mouse and a PC: the real device passes through untouched, and your program injects input of its own over a USB-serial link. These bindings let you write that program in C / C++ or Python instead of Rust. They cover the whole feature set and put the exact same bytes on the wire.
your program ( C / C++ / Python )
│
┌──────────────▼──────────────┐
│ language binding │ ◀ these pages
└──────────────┬──────────────┘
│ C ABI · medius.h + libmedius_capi
┌──────────────▼──────────────┐
│ medius (Rust core) │ ◀ the client library
└──────────────┬──────────────┘
│ 4 Mbaud USB-serial frames
┌──────────────▼──────────────┐
│ the medius box │ ▶ mouse + game PC
└─────────────────────────────┘C and C++ are one binding: the C header (medius.h) compiles as both, so a C++ program includes it and calls the same functions. If you're new to medius, start with the Quickstart for what the box does; these pages link to the Rust Library and Native API for what each command means.
Languages
Same capabilities, different ergonomics| Language | Install | Errors | Cleanup | Reach for it when |
|---|---|---|---|---|
Python | pip install medius | raises MediusError | automatic (with / GC) | scripting, automation, fast prototyping |
C / C++ | download the prebuilt library | returns MediusStatus | manual (*_free) | a C or C++ app, embedding, a base for another FFI |
Coverage
Every box feature, in every language| Capability | C / C++ | Python |
|---|---|---|
| Connect, find, clone the link | ✓ | ✓ |
| Move & wheel | ✓ | ✓ |
| Inject buttons, keys, media | ✓ | ✓ |
| Lock physical input | ✓ | ✓ |
| Catch live input (streams) | ✓ | ✓ |
| Buffered clip playback | ✓ | ✓ |
| Options & LED | ✓ | ✓ |
| Queries (version, health, caps…) | ✓ | ✓ |
| Mock box (testing) | build flag | build flag |
| Flash firmware | build flag | build flag |
| Async | sync only. Build it on the stream timeouts (see each Streams page) | |
Mock and flash are off by default; each binding's Build & features page shows how to turn them on.