API Guide
This section explains the developer-facing API boundaries of Librux. It is a guide, not the exhaustive API catalog.
There are two primary API surfaces.
- Subsystem SDK API - the Python and C++ API used by subsystem authors inside a subsystem.
- Host Control API - the REST and WebSocket API exposed by the host control backend for the Web Console, automation, monitoring, app management, and external integration.
Choose the API by where the code runs.
| Code location | Use |
|---|---|
| Managed subsystem on a supported Linux runtime host | Subsystem SDK API |
| Browser frontend or packaged app UI | Host Control WebSocket API |
| Windows/macOS tool, cloud service, or other non-Librux client | Host Control REST/WebSocket API |
| Deployment automation, package management, runtime inspection | Host Control REST API |
| ROS 2 code that should participate as a Librux subsystem | A ROS 2 interface subsystem using the Subsystem SDK |
The language-neutral message, API contract, and component contracts are documented under Spec. A spec entry is not a runtime method catalog by itself. It is the semantic contract that SDK code declares, registers, calls, or validates against.
For table-oriented lookup, use API Reference.
API Map
| Page | Use when |
|---|---|
| Subsystem SDK API | Learning the subsystem-author API flow in Python or C++ |
| Host Control REST API | Learning how operator tools, automation, deployment checks, and app management clients use HTTP |
| Host Control WebSocket API | Learning how browser or outside-runtime clients observe Events or invoke Procedure/Operation calls |
| Typed Payload and Codec | Understanding typed message refs, codec behavior, and the timing envelope |
Use these Reference pages when you need the catalog.
| Reference | Contains |
|---|---|
| Subsystem SDK Reference | Public subsystem-author classes and method groups |
| Host Control REST Routes | REST route table, method, role, and request-body summary |
| Host Control WebSocket Messages | WebSocket endpoints, client message kinds, server responses, and fields |
| Data Types And Binary Encoding | Binary encoding details for typed payloads |
Boundary Rule
Keep these boundaries separate.
- Subsystem code uses the SDK and should not depend on REST routes.
- Browser and external tools use the Host Control API and should not implement native runtime transport.
- Non-Linux or non-Librux clients use Host Control WebSocket for live observation and Procedure/Operation requests.
- Product frontends should use the stable
/api/v1Host Control prefix. The bundled Web Console is optional and can be disabled or replaced. - Semantic contracts live under Spec and are referenced by SDK/API calls through message refs, API contracts, components, and endpoint declarations.
Public SDK Surface
Runtime SDK APIs are provided by language SDKs.
- Python -
librux.wrapper.GatewaySubsystem,ComponentSubsystem,CompoundSubsystem,AppSubsystem - C++ -
librux::wrapper::GatewaySubsystem,ComponentSubsystem,CompoundSubsystem,AppSubsystem
The runtime core is implemented in Rust. The public subsystem-author SDK surface is Python and C++.
Language-specific syntax may differ, but declare/register/lifecycle semantics, endpoint metadata, message refs, timing support policy, and Event / Control / Procedure / Operation behavior should remain shared across the public SDKs.