Building from Source
Prerequisites
- pixi -- Environment and dependency management
- XMake -- Build system (not installed by pixi; install separately)
- Git
Supported Platforms
| Platform | Toolchain |
|---|---|
| Windows (win-64) | MSVC (VS2022) |
| Linux (linux-64) | GCC 14.2 |
| macOS (osx-arm64) | Clang 20.1 |
Build Commands
All builds are managed through pixi tasks:
bash
# Configure the build (mode: debug, release, or releasedbg)
pixi run cfg debug
# Build the project
pixi run build
# Configure in release mode
pixi run cfg release
# Build JavaScript/TypeScript API
pixi run build-js
# Install npm dependencies
pixi run npm-installBuild System
The project uses XMake as the build system, managed through pixi tasks. The C++ standard is C++23.
Build Targets
catter-- Main CLI executable (the DECISION daemon)catter-proxy-- Proxy process managercatter-hook-unix-- Unix hook shared library (Linux/macOS)catter-hook-win64-- Windows hook DLLcatter-core-- Core librarycommon-- Shared utilities library
JavaScript Build
The TypeScript API under api/ is compiled to JavaScript and embedded into the catter binary. Build with:
bash
pixi run build-jsThis runs rollup to bundle the TypeScript, and the resulting JS is compiled into the binary as a resource.
Key Dependencies
- QuickJS-ng (v0.11.0) -- Embedded JavaScript engine
- spdlog (1.15.3) -- Logging
- kotatsu -- Async runtime, testing framework, option parsing
- MinHook (v1.3.4) -- Windows API hooking (Windows only)