42 lines
2.4 KiB
Markdown
42 lines
2.4 KiB
Markdown
|
|
## This repository: Crafter.Build
|
||
|
|
|
||
|
|
A C++26 modules build system that builds itself. The stated design is
|
||
|
|
`README.md` (the manual) and `AGENTS.template.md` (the contributor guide;
|
||
|
|
`AGENTS.md` is written from it by a crafter-build build or test run, not
|
||
|
|
by `build.sh`, and is not in the tree).
|
||
|
|
Its "Design rules" and "Security considerations" are the owner's
|
||
|
|
decisions: a range that departs from one without saying so is a finding;
|
||
|
|
whether one should change is the owner's call, not a defect of the range.
|
||
|
|
Among them, for CI, which holds the workflow's token and the signing key
|
||
|
|
its runner mounts: no secret is added to the workflow, and the
|
||
|
|
environment is never echoed in it.
|
||
|
|
|
||
|
|
The layers: the library (`interfaces/`, `implementations/`), which the
|
||
|
|
executable wraps and every `project.cpp` is compiled against; this
|
||
|
|
repository's own `project.cpp`; `build.sh`, the bootstrap that builds the
|
||
|
|
tool without the tool; the Flatpak (`packaging/flatpak/`), which bundles
|
||
|
|
the LLVM users build with; CI (`.forgejo/workflows/ci.yaml`). A target
|
||
|
|
difference branches on `cfg.target` at run time, never on the host; an
|
||
|
|
output path goes through `BinDir()`, `BuildDir()` or `PcmDir()`; whatever
|
||
|
|
changes what gets compiled or bundled reaches `VariantId()`.
|
||
|
|
|
||
|
|
Search first: the partitions' own helpers (`RunBuildCommand`,
|
||
|
|
`RunCommandChecked`, `Progress::Diagnostic`, `ApplyStandardArgs`,
|
||
|
|
`HostTarget`, `GitProject`, `LocalProject`); the Crafter.* libraries the
|
||
|
|
tree already uses, cloned under `~/.cache/crafter.build/external/`; libc++
|
||
|
|
and clang as the host installs them (`/run/host/usr/include/c++/v1`,
|
||
|
|
`/run/host/usr/lib/clang/`); git, cmake and flatpak-builder.
|
||
|
|
|
||
|
|
Commit shape here: a fix, its test and its README change are separate
|
||
|
|
commits when each stands on its own, in that order, and a bug fix ships
|
||
|
|
with a test that fails before it. That split is not a later commit
|
||
|
|
repairing an earlier one.
|
||
|
|
|
||
|
|
Compatibility: the `project.cpp` of every sibling repository beside this
|
||
|
|
checkout (`../Crafter.*/project.cpp`) and of every user compiles against
|
||
|
|
what `interfaces/` exports and is loaded by the binary; the CLI, the
|
||
|
|
`CRAFTER_BUILD_*` variables, the cache an older version left under
|
||
|
|
`~/.cache/crafter.build/` and the `bin/` layout CI globs are contracts too.
|
||
|
|
Users get a push to master through the Flatpak's `beta` branch and a tag
|
||
|
|
through `stable`. A change an existing `project.cpp` does not survive is a
|
||
|
|
finding unless the range documents, in the README, what users must change.
|