Remo is a modular C++ library for building modern backend components that offer:
- Remote Procedure Calls (RPC) over HTTP using the JSON-RPC 2.0 protocol.
- Real-time data and event publishing over WebSockets.
Designed for backend applications written in modern C++, Remo provides clear interfaces and is built on top of Boost.Beast for robust HTTP and WebSocket communication.
Started as a "Vibe Coding" experiment 🙂.
- 📡 JSON-RPC 2.0 over HTTP with support for primitive and structured types.
- 📤 Generic WebSocket broadcasting for JSON-serializable data.
- 🔧 Easy-to-use APIs with
std::function-based handler registration. - 🚦 Robust error handling and compliant JSON-RPC 2.0 responses.
- 💻 Clean example applications for both RPC and WebSocket components.
- C++17
- Boost (
system,thread,asio,beast) - nlohmann/json (included via
FetchContent)
BeastRPCServer server(8080);
server.register_method("hello", [](const json& params) {
std::string name = params.at(0);
return "Hello " + name + "!";
});
server.start();BeastWebSocketPublisher publisher(8081);
publisher.start();
// In a separate thread or periodic task
publisher.publish({{"status", "ok"}, {"temperature", 42.5}});lib/
├── rpc/ # JSON-RPC over HTTP server (remorpc target)
└── websocket/ # WebSocket publisher (remowebsockets target)
examples/
├── rpc_application/ # Working RPC example
└── publisher_application/ # Working WebSocket publishing example
Detailed steps for building the library and creating a distributable package are provided in docs/build_and_install.md.
- ✅ WebSocket broadcasting for generic JSON data
- ⏳ Topic-based subscription mechanism
- ⏳ Catch2 integration for testing
- ✅ Packaging and installation support
MIT
This project uses: