Relay is a build automation and package manager for C/C++ projects, leveraging Python for the CLI, CMake for the build system, and vcpkg for dependency management.
Relay offers two main installation methods: downloading pre-built binaries (recommended for most users) or building from source.
Download the appropriate pre-built executable for your operating system:
- For macOS/Linux (x64):
curl -LJO https://github.com/3akare/relay/releases/latest/download/relay-macos-x64.zip && \ unzip -o relay-macos-x64.zip && \ sudo mkdir -p /opt && \ sudo mv relay /opt/relay && \ sudo ln -sf /opt/relay/relay /usr/local/bin/relay && \ rm relay-macos-x64.zip && \ echo "Relay installed! Try: relay --version"
To install Relay globally on your system from source, you will need Python 3, CMake, and vcpkg installed.
-
Clone the Relay repository:
git clone https://github.com/3akare/relay.git cd relay -
Ensure Prerequisites: Make sure you have the following installed and accessible in your
PATH:- Python 3
- CMake
- vcpkg (and set the
VCPKG_ROOTenvironment variable to your vcpkg installation directory, preferably the Git clone) - PyInstaller
pip install pyinstaller
-
Run the Installation Script: Execute the build and install script from the project root. This script uses PyInstaller to create a self-contained executable folder and installs it to
/opt/relay, then creates a symbolic link in/usr/local/bin.chmod +x scripts/build_and_install.sh sudo scripts/build_and_install.sh
-
Verify Installation: Open a new terminal window and run:
relay --version
If the version number is displayed, Relay is installed correctly.
Relay provides several commands to manage your C/C++ projects.
C/C++ package manager
positional arguments:
{new,build,b,run,r,install,i,add,remove,rm,update,clean}
Available commands
new Create a new relay package
build (b) Compile the current package
run (r) Run a binary or example of the local package (make then run)
install (i) Install dependencies listed in Relay.toml via vcpkg
add Name of the dependency to add (e.g., 'fmt', 'zlib')
remove (rm) Remove a dependency from the project
update Update project dependencies
clean Remove build artifacts and cached files
options:
-h, --help show this help message and exit
--version, -V Print version info and exit
--toolchain TOOLCHAIN
Specify the build toolchain triplet (e.g., x64-windows, x64-linux). Defaults to VCPKG_DEFAULT_TRIPLET environment variable or guesses based on OS.
-v, --verbose Use verbose outputCreate a new project:
relay new embedded_c
cd embedded_cBuild the project (with a specific toolchain):
relay build # relay will try to guess the toolchain based in your system and machineor
relay --toolchain x64-osx buildRun the project executable:
relay run # relay will try to guess the toolchain based in your system and machineor
relay --toolchain x64-osx runTo uninstall Relay, you need to remove the installed files from your system.
If you have a script at scripts/uninstall.sh:
chmod +x scripts/uninstall.sh
sudo scripts/uninstall.shsudo rm -rf /opt/relay # Removes the installed application directory
sudo rm /usr/local/bin/relay # Removes the symbolic link