-
Notifications
You must be signed in to change notification settings - Fork 3
LocalRaftLibraries
During the build process, Raft components are normally fetched from GitHub using CMake's FetchContent mechanism. Each component is declared in the RAFT_COMPONENTS list inside the SysType's features.cmake file.
To support local development and debugging of Raft libraries — without pushing changes to GitHub first — the build system checks for a local override folder before attempting any remote fetch.
Before fetching a Raft component from its remote GitHub repository, the build system checks whether a directory exists at:
<project-root>/raftdevlibs/<ComponentName>
If that directory is present, the build system uses it in place of the remote source. A clear message is printed during CMake configuration to indicate that the local copy is being used:
============================================================
LOCAL (DEBUG) LIBRARY: RaftCore
Using: /path/to/project/raftdevlibs/RaftCore
(Skipping fetch from https://github.com/robdobsn/RaftCore.git)
============================================================
If the directory does not exist, the component is fetched from GitHub as normal.
The fastest way is to let RaftCLI populate the folder for you:
cd <project-root>
raft libs # fetch RaftCore + RaftSysMods + RaftI2C + RaftWebServer at main
raft libs --branch v1.44.1 # or pin a specific tag
raft libs --libs RaftI2C # or fetch just the one you needExisting checkouts are updated with git fetch --all --tags and the requested branch/tag/commit. Repos with uncommitted changes are skipped unless --force is given. The destination defaults to <project-root>/raftdevlibs/ and can be overridden with --dest.
To set things up manually instead:
-
Create the
raftdevlibsfolder at the root of your project (alongsidesystypes/,main/, etc.):<project-root>/ ├── raftdevlibs/ │ └── RaftCore/ ← local checkout of the RaftCore repo ├── main/ ├── systypes/ └── CMakeLists.txt -
Place your local clone of the component repository inside
raftdevlibs/using the exact component name as the folder name. For example, to overrideRaftCore:cd <project-root>/raftdevlibs git clone https://github.com/robdobsn/RaftCore.git -
Rebuild. CMake will detect the local folder and use it instead of fetching from GitHub.
- The folder name inside
raftdevlibs/must exactly match the component name as it appears inRAFT_COMPONENTS(case-sensitive). - This works for any component listed in
RAFT_COMPONENTS, not justRaftCore. - The
raftdevlibsfolder is a local-only development aid and should normally be added to.gitignoreto avoid accidentally committing it. - Components resolved from
raftdevlibsare treated identically to remotely fetched ones — they are added toEXTRA_COMPONENT_DIRSand included as project dependencies in the same way.
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
- PlatformIO / Arduino
Scaffolding & Building
- Raft CLI
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
Helpers
Reference