Developer tooling for SR-Mjolnir and SR-Gungnir, SR8's high level repositories. Includes:
srpkg: creates a new DDS package in your current working directorysrbuild: wraps CMake to configure, build, and install targets
Both tools are installed as a uv tool.
srlaunch (process launcher) has moved to deprecated/. QNX targets should use QNX's own process management. It is being replaced by a cross-platform orchestrator (Seb's thesis).
Install globally as a uv tool (recommended):
uv tool install git+https://github.com/UNSW-Sunswift/SR-Dev-Tools.gitThis puts srbuild and srpkg on your PATH. To upgrade later:
uv tool upgrade sr-dev-toolsFor local development on this repo itself:
git clone git@github.com:UNSW-Sunswift/SR-Dev-Tools.git
cd SR-Dev-Tools
uv tool install --editable .From a Dockerfile:
RUN uv tool install git+https://github.com/UNSW-Sunswift/SR-Dev-Tools.gitCreates a new DDS package in the current working directory. Same idea as ros2 pkg create.
srpkg create <package_name>This creates:
<package_name>/
├── .srpkg # Package metadata marker
├── src/
│ └── main.cpp
├── include/
├── test/
├── param/
│ └── <package_name>_param.toml
├── CMakeLists.txt # Build configuration template
└── README.md
Package names must be snake_case. srpkg only checks for a duplicate name in the current directory and does not search the rest of your repository. If you have a build system which builds multiple executables from different directories, it is on you to make sure no packages (and so executables) share a name.
Invokes CMake to configure, build, and install targets. Assumes top level CMakeLists is at your current working directory, or discovers the repository root (see below).
srbuild looks for a .sunswift-evsn marker file, walking up from your current directory. The nearest directory containing it is treated as the root, and is assumed to contain your top-level CMakeLists.txt.
# Build and install everything
srbuild all
# Build and install specific targets
srbuild target node1 node2 ...
# Delete the entire build/ directory
srbuild cleansrbuild all --linux # native build, no toolchain file
srbuild all --qnx=cmake/qnx_toolchain.cmake # cross-compile using the given toolchain fileYou must supply --qnx or --linux are mutually exclusive. --qnx takes a path to a CMake toolchain file, resolved relative to your current working directory (not the discovered repo root).
Given a discovered root, srbuild produces:
<root>/
├── CMakeLists.txt
├── build/
│ └── linux/ (or qnx/, depending on the flag used)
├── deploy/
│ └── linux/ (or qnx/)
│ ├── bin/
│ └── param/
build/ holds CMake's intermediate files (don't touch it directly). deploy/ holds the stuff to deploy (duh)
srbuild all --jobs 4
srbuild target node1 -j 16Defaults to 8 parallel jobs.
cd path/to/your/project/src
srpkg create my_dds_node
# fill in my_dds_node/src, include/, and CMakeLists.txt
cd path/to/your/project
srbuild target my_dds_node
# or
srbuild all- Ryan Wong || z5417983
- Henry Jiang || z5416365