AtlatestRepositorycore-channel
core-channel / treeREADME.md
1
# core-channel3
`core-channel` is the ordinary Sigil library repository behind the authenticated4
`core/` environment-package scope. Reviewed package definitions live under5
`src/` and are imported like any other Sigil modules. The signed snapshot and6
catalogue authenticate that source tree and its exported canonical package7
objects. Generated toolchains, source archives, build output, and the seed8
tarball are deliberately not committed.10
## Clone, bootstrap, enter12
On x86_64 Linux, a checkout becomes a working `--channel` directory with:14
```sh15
./bootstrap16
export SIGIL_REGISTRY_METADATA=/path/to/root-signed/registry.json17
SIGIL_CHANNEL="$PWD" sigil env lock -f demo/env.sgl --lock-file env.lock18
sigil env shell -f env.lock -- hello19
```21
`sigil env shell` consumes an `env.lock`, never environment source, so the lock22
step is separate and comes first. Only the lock step needs the channel and the23
registry metadata; consumption deliberately needs neither. Requires sigil24
0.18.0 or newer, which is the first release with `env`.26
`bootstrap` downloads the seed and Zig archives from their manifest URLs,27
verifies their SHA-256 hashes before installation, and refuses altered or28
unexpected content. It requires `sh`, `sha256sum`, `tar`, and either `curl` or29
`wget` on the host.31
Authenticated package values are published under the `core/` scope by the32
catalogue. For example, `(core packages wasm)` defines Binaryen 112 and the33
catalogue exports it as `core/binaryen`. `sigil project lock` evaluates only34
the snapshot-pinned `src/` closure, verifies the exported package identity,35
realizes missing outputs, and seals those results into referenced locks.37
The older `recipes/` directory remains for the original external-build channel38
prototype. New authenticated package definitions use normal modules under39
`src/`; do not duplicate them in `recipes/`.41
## Repository layout43
- `package.sgl`: ordinary Sigil library metadata.44
- `src/`: reviewed authenticated package-definition modules.45
- `objects/`: canonical package values named by their SHA-256 identity.46
- `snapshot.sgl`: signed source/toolchain snapshot.47
- `channel.catalogue.sgl`: signed exported binding-to-package map.48
- `channel.sgl`: executable curator declaration for public package bindings.49
- `recipes/`: legacy external-build prototype recipes.50
- `seed/MANIFEST`: pinned downloadable seed artifact.51
- `seed/MANIFEST.sources` and `seed/scripts/`: pinned seed sources and the52
reproducible seed build.53
- `toolchain/MANIFEST`: pinned Zig distribution.55
After editing channel source or bindings, run `sigil channel publish` with the56
channels-role signing context. `make check` deterministically re-derives the57
sealed objects and roots and refuses stale committed artifacts; CI should run58
the same target. The metadata under `test/` and the currently committed root59
signatures use public, unlocked test keys and are not deployable production60
artifacts.61
- `bootstrap`: verified materialization of ignored binary inputs.62
- `scripts/gate-*`: permanent reproducibility, isolation, tamper, and63
concurrency checks.65
Release `seed-v1` must carry `seed-x86_64-linux.tar.gz` with the exact hash in66
`seed/MANIFEST`. The release asset is produced with67
`seed/scripts/build-seed.sh`; it is never added to Git.69
## Gates71
```sh72
scripts/gate-hash-verify.sh73
scripts/gate-crosscheckout.sh74
scripts/gate-crosspath.sh75
SIGIL_BIN="$(command -v sigil)" scripts/gate-concurrency.sh76
```78
The fresh-clone gate accepts `SIGIL_BOOTSTRAP_SEED_URL` and79
`SIGIL_BOOTSTRAP_ZIG_URL` solely to test unpublished release assets or local80
mirrors. Overrides change locations, never expected hashes.