This directory contains the build tool for KalamDB.
The build script is an interactive tool for building releases, binaries, and Docker images.
./tools/build # Interactive mode
./tools/build --help # Show help- Auto-detects version from
Cargo.toml - Multi-platform builds: Linux, macOS, Windows
- GitHub release creation with checksums
- Docker Hub publishing
When you run ./tools/build, it will:
- Detect version from
Cargo.tomlautomatically - Ask for version tag (e.g.,
v0.1.1) - Platform selection - multi-select which platforms to build:
linux-x86_64- Linux Intel/AMD 64-bitlinux-aarch64- Linux ARM 64-bitmacos-x86_64- macOS Intelmacos-aarch64- macOS Apple Siliconwindows-x86_64- Windows 64-bit
- GitHub release - optionally create a release with all artifacts
- Docker build - optionally build and push Docker images
| Feature | Requirement |
|---|---|
| Binary builds | Rust toolchain |
| Cross-compilation | cargo install cross |
| GitHub releases | brew install gh && gh auth login |
| Docker builds | Docker Desktop |
╔════════════════════════════════════════════════════════════╗
║ KalamDB Build Tool ║
╚════════════════════════════════════════════════════════════╝
ℹ Detected version from Cargo.toml: 0.1.1
? Version tag for release [v0.1.1]:
? Select target platforms:
(Use arrow keys to move, space to toggle, enter to confirm)
▸ ◉ linux-x86_64
◉ linux-aarch64
◉ macos-x86_64
◉ macos-aarch64
◉ windows-x86_64
? Create GitHub release? [y/N]: y
? Build Docker image? [y/N]: n
════════════════════════════════════════════════════════════
Build Summary
════════════════════════════════════════════════════════════
Version: 0.1.1
Tag: v0.1.1
Platforms: 2 selected
• macos-aarch64
• linux-x86_64
GitHub Release: true
Docker Build: false
Profile: release-dist
════════════════════════════════════════════════════════════
? Proceed with build? [Y/n]:
The build uses a custom release-dist profile optimized for distribution:
[profile.release-dist]
inherits = "release"
opt-level = "z" # Optimize for size
lto = true # Link Time Optimization
codegen-units = 1 # Better optimization
panic = "abort" # Smaller binary
strip = true # Strip debug symbolsBinaries are output to dist/<version>/:
dist/0.1.1/
├── kalam-0.1.1-macos-aarch64
├── kalam-0.1.1-macos-aarch64.tar.gz
├── kalamdb-server-0.1.1-macos-aarch64
├── kalamdb-server-0.1.1-macos-aarch64.tar.gz
└── SHA256SUMS
For Docker-specific builds, see:
docker/build/Dockerfile- Production Dockerfiledocker/run/single/docker-compose.yml- Compose configurationdocker/README.md- Docker deployment guide
| File | Purpose |
|---|---|
Dockerfile.builder |
Cross-compilation Docker image (for CI) |
cargo-config.toml |
Cargo configuration for cross-compilation |
ARCHITECTURE.md |
Build system architecture documentation |
Install the GitHub CLI:
brew install gh
gh auth loginRun gh auth login and follow the authentication flow.
Make the script executable:
chmod +x tools/build# Install Xcode Command Line Tools
xcode-select --install
# Or install LLVM via Homebrew
brew install llvmInstall the cross tool:
cargo install cross