This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 11/4/2026.
Deps
import std/depsdeps.kz - System dependency management for Koru
deps.kz · 3 tors · ~[comptime]
deps.kz - System dependency management for Koru · 35 more lines
deps.kz - System dependency management for Koru
This module provides tors for declaring system-level dependencies
(libraries installed via brew, apt, dnf, pacman, etc.) that are required
for Koru packages to build.
Usage in a library (e.g., curl/index.kz):
import std/deps
std/deps:requires.system {
"name": "curl",
"check": "curl-config --version",
"brew": "curl",
"apt": "libcurl4-openssl-dev"
}
`check` answers presence (installed?). An optional `ready` field answers
liveness — a command whose exit 0 means the dependency is usable NOW:
a daemon accepting connections, a server listening:
std/deps:requires.system {
"name": "docker",
"check": "docker --version",
"ready": "docker info",
"brew": "docker"
}
The third state — installed but not ready — is reported separately;
`deps install` cannot fix a down daemon.
Then users can run:
koruc main.kz deps # Show status of all system dependencies
koruc main.kz deps install # Install missing deps (auto-detects package manager)
koruc main.kz deps install --pm brew # Force specific package manager
// REQUIRES.SYSTEM EVENT - Declare a system dependency
~[comptime|norun] pub tor requires.system { source: Source }// REQUIRES.ZIG EVENT - Declare a Zig package dependency
~[comptime|norun] pub tor requires.zig { source: Source }~part command koru_std/deps.command.kz
Koru Standard Library: the `command` part of deps.kz — the deps check/ install command implementation. Joined via `~part command` in deps.kz; merged into the deps module at load. DEPS COMMAND - Check and install system dependencies
~[comptime|command] pub tor deps {
program: std/compiler:*const Program,
allocator: __koru_std.mem.Allocator,
argv: []string
}