Skip to content
Rob Dobson edited this page Oct 26, 2026 · 55 revisions

Raft

Raft is an opinionated framework for embedded development. It picks up where the Arduino libraries stop and builds on the basic ideas of setup() and loop() to enable even the most complex applications to be built. Raft simplifies:

  • Cooperative multi-tasking
  • Configuration (smart, JSON-based)
  • Networking (WiFi, BLE, Ethernet, serial)
  • Communications (REST, WebSockets, MQTT, file transfer, BLE GATT)
  • OTA update (unified mechanism over BLE, WiFi or serial)
  • Web server (static files, REST API, WebSockets, SSE)
  • I2C bus (auto-detection, identification, polling, recovery)
  • Modular design (mix and match capabilities; few interdependencies)

Raft builds on Arduino setup() and loop() for configuration and async operations, and is opinionated about Convention over Configuration: most of what every connected device needs is provided by default, and configured with a single JSON document.

Raft currently targets the ESP32 family (ESP32, ESP32-S3, ESP32-C3, ESP32-C6) on top of ESP IDF.


1. Getting Started

2. Scaffolding and Building

3. Raft Architecture

4. Built-in SysMods

Networking and connectivity:

Comms channels:

Files, logging and updates:

Publishing and state:

Devices and buses:

  • See section 6 below.

5. Communications and Protocols

6. Devices and Buses

7. ROS 2 (RaftROS)

  • RaftROS — a Raft application as a native ROS 2 node: auto-published device topics, services, parameters, /api/ros
  • RaftROS Serial Link — the Zenoh session over the USB cable, switched on and off at run time
  • Console Port Sharing — RaftConsolePort, how a binary link takes the console's port

8. Helper Classes and Utilities

9. Reference

10. Operations and Tooling


Repository map

The Raft framework is split across several repositories:

Repo Contents
RaftCore Framework core: SysManager, SysMod base, comms stack, configuration, helper classes
RaftSysMods Built-in SysMods: BLE, Network, MQTT, FileManager, LogManager, OTA, comms channels
RaftI2C I2C bus driver, device scanning, identification, polling
RaftWebServer HTTP / WebSocket / SSE web server with REST, static-file and upload handlers
RaftROS ROS 2 node SysMod (Zenoh, RTPS), device auto-publishing, services, parameters
RaftCamera Camera SysMod (esp32-camera): still captures, interval captures, published frames
RaftCLI The raft command-line tool: scaffold, build, flash, monitor, OTA, and device files and type records

Each repo also has a devdocs/ folder with internal design notes that may be promoted into this wiki over time.

Licences

The Raft libraries are MIT licensed. RaftCore also contains some third-party code and device type records with settings from third-party drivers: its THIRD_PARTY_NOTICES.md lists them with their licences, and the notices a product built with Raft should include in its documentation (with those of ESP-IDF and the other libraries it uses).

Clone this wiki locally