Bindings
A Medius box sits between a mouse and a PC: it relays native reports untouched, and your program injects input over a USB-serial link.
With the bindings, that program is C / C++ or Python instead of Rust and sends the same frames.
your program ( C / C++ / Python )
│
┌──────────────▼──────────────┐
│ language binding │ ◀ these pages
└──────────────┬──────────────┘
│ C ABI · medius.h + libmedius_capi
┌──────────────▼──────────────┐
│ medius (Rust core) │ ◀ the client library
└──────────────┬──────────────┘
│ 6 Mbaud USB-serial frames
┌──────────────▼──────────────┐
│ the Medius box │ ▶ mouse + game PC
└─────────────────────────────┘C and C++ are one binding: the header, medius.h, compiles as both. The Quickstart covers what the box does; the Rust Library and Native API define each command.
LanguagesInstall, errors and cleanup per language
| Language | Install | Errors | Cleanup | Use for |
|---|---|---|---|---|
Python | pip install medius | raises MediusError | automatic (with / GC) | scripts, automation, prototyping |
C / C++ | download the prebuilt library | returns MediusStatus | manual (*_free) | C or C++ apps, embedding, a base for another FFI |
CoverageCapability per language
| Capability | C / C++ | Python |
|---|---|---|
| Connect, find, clone the link | yes | yes |
| Move & wheel | yes | yes |
| Inject buttons, keys, media | yes | yes |
| Lock native input | yes | yes |
| Catch live input (streams) | yes | yes |
| Buffered clip playback | yes | yes |
| Options & LED | yes | yes |
| Queries (version, health, caps) | yes | yes |
| Mock box (testing) | build flag | build flag |
| Update firmware | yes | yes |
| Async | sync only; build async on the stream timeouts (see each Streams page) | |
Mock is off by default; each binding's Build & features page shows how to turn it on.