Repository navigation
Conversation
Spec types read from orch parse, Config, and the supervise helpers every platform shares, as plain Zig: explicit arenas, diagnostics beside error sets, tests that pin the behaviour.
orchd tend --spec keeps a tree in Zig: gates, pre_start, the tree in its own process group, HUP to reload with MAINPID, TERM to tear down within the stop timeout, and the ready marker for oneshots. The CLI is one table of flags that drives both parsing and help; the version comes from build.zig.zon.
Config comes from flags, env, .orchrc and defaults; the Orchfile is read by orch parse, the spec's reference parser; a rootstock is apple or a plugin found beside orchd or on PATH, speaking contract 1, heard even when it fails before reading its envelope.
release.sh bumps build.zig.zon and its lockstep files, the version orchd reports; releases build static Linux binaries with musl and bundle orch; the pre-commit hook runs zig fmt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Rust core is gone. orchd is Zig 0.17.1, std only, with no dependencies.
What it is
types,config,settings: the spec and Config. Settings resolve as flag, then env, then.orchrc, then default.spec: reads the Orchfile throughorch parse, the spec's reference parser, with the built-in variables overlay andORCH_ARG_*/--argoverrides.rootstock: a tagged union ofapple(built in) andexternal(contract 1, found beside orchd or onPATH).platform: an enum over launchd, systemd and orchdi. Each renders beds (artifacts, plus the stale paths a bed replaces).growandorchd tendwrite them with the same code, soplantnow renders orchdi beds and launchd's disabled split. In Rust it rendered neither.keeper:orchd tend --spec. Gates, pre_start, the tree in its own process group, HUP to reload withMAINPID, TERM to tear down within the stop budget, and the ready marker.engine,orchard: grow/survey/fell/logs and the sow/plant/tend rows. The spec is parsed once per run.cli: one comptime table of flags drives both parsing and help. The version comes frombuild.zig.zon.Parity with the Rust core
orch parse | orchd sow | orchd plantover an Orchfile with deps, health checks, a oneshot, STOP, RELOAD, env and env files, limits, logs, user and DISABLED. Every artifact matches Rust's: 7/7 on launchd (plists byte for byte, keeper specs equal in content) and 8/8 on systemd (units, ready gates, target).grow,grow --reload(the HUP reaches the tree),fell(nothing left), and a container under bare is refused. The fell-check takes 30 s on Rust and on Zig alike.MAINPID, graceful TERM, a STOP that doesn't stop is killed after its timeout, an optional gate proceeds, a failing required gate refuses, a oneshot leaves its ready marker, and a failure removes it.Deliberate differences
reloadwith no names skips trees the rootstock can't plant, instead of failing.error: no bed is planted for x), withoutplatform error: lifecycle failed:in front.Release
release.shbumpsbuild.zig.zonand its lockstep files.orch.zig fmt.