Add indications for cross building

This commit is contained in:
2026-02-25 22:08:08 +01:00
parent 0119988d7c
commit c219b4efab
4 changed files with 165 additions and 0 deletions

91
BUILDING.md Normal file
View File

@@ -0,0 +1,91 @@
# Building Cagire
## Prerequisites
**Rust** (stable toolchain): https://rustup.rs
## System Dependencies
### macOS
```bash
brew install cmake
```
cmake is required by `rusty_link` (Ableton Link C++ bindings). Xcode Command Line Tools provide the C++ compiler. CoreAudio and CoreMIDI are built-in. The desktop build needs no additional dependencies on macOS (Cocoa/Metal are provided by the system).
### Linux (Debian/Ubuntu)
```bash
sudo apt install cmake g++ pkg-config libasound2-dev libjack-jackd2-dev
```
For the desktop build (egui/eframe), also install:
```bash
sudo apt install libgl-dev libxkbcommon-dev libx11-dev libxcursor-dev libxrandr-dev libxi-dev libwayland-dev
```
### Linux (Arch)
```bash
sudo pacman -S cmake gcc pkgconf alsa-lib jack2
```
For the desktop build:
```bash
sudo pacman -S libxkbcommon libx11 libxcursor libxrandr libxi wayland mesa
```
### Linux (Fedora)
```bash
sudo dnf install cmake gcc-c++ pkgconf-pkg-config alsa-lib-devel jack-audio-connection-kit-devel
```
For the desktop build:
```bash
sudo dnf install libxkbcommon-devel libX11-devel libXcursor-devel libXrandr-devel libXi-devel wayland-devel mesa-libGL-devel
```
### Windows
Install Visual Studio Build Tools (MSVC) and CMake. Everything else is provided by the Windows SDK.
## Build
Terminal (default):
```bash
cargo build --release
```
Desktop (egui window):
```bash
cargo build --release --features desktop --bin cagire-desktop
```
## Run
Terminal (default):
```bash
cargo run --release -- [OPTIONS]
```
Desktop (egui window):
```bash
cargo run --release --features desktop --bin cagire-desktop
```
| Flag | Description |
|------|-------------|
| `-s, --samples <path>` | Sample directory (repeatable) |
| `-o, --output <device>` | Output audio device |
| `-i, --input <device>` | Input audio device |
| `-c, --channels <n>` | Output channel count |
| `-b, --buffer <size>` | Audio buffer size |