5 hours ago
- The post discusses designing a build system for permacomputing, focusing on the ../lua/civ build system and a proposed package manager.
- A good build system must explicitly define all inputs and outputs for each build phase.
- Make is criticized for being a collection of shell scripts with platform-specific syntax and lacking an overarching structure.
- Another principle is that a build system should allow programmatic configuration of inputs and outputs for different target systems.
- Civ's solution uses a configurable 'sys hub' that abstracts file locations and build logic through a minimal, well-defined API.
- Civ's implementation is lightweight (1000 lines of C utility libraries and ~100 lines of Lua), unlike Bazel which forks Python and is more complex.
- The proposed package manager includes a 'hubrepo' (a git repo) that stores hubs and dependencies, allowing version locking via a .civ.lockfile.
- To submit code to a hub, developers must create a pull request that includes tests and documentation, which is auto-merged by a bot.