mach-project-overview
Overview of the `mach` compiler repository, build lifecycle, dependency rules, and workspace guidance for contributors.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Purpose
This skill documents the repository layout, common build workflows, dependency rules, and workspace tips for contributors and agents acting on behalf of contributors.
Quick facts
- Build targets:
-
make cmach— builds the bootstrap compiler intoout/bin/cmach. -
make imach— runs$(CMACH) build . -o out/linux/bin/imach(intermediate stage; incomplete). -
make mach— pipeline continuation/scaffolding (incomplete).
-
- CLI:
cmachsupports subcommandsinit,build,run,dep,help. - Docs: Mach language reference lives under
doc/*.
Dependency rules & workspace guidance
-
Do not manually edit files under
dep/*. Usecmach depsubcommands instead. - Useful
cmach depcommands:-
cmach dep list -
cmach dep info <name> -
cmach dep tidy -
cmach dep add [--local] <path> <name> [--version <version>] -
cmach dep del <name> -
cmach dep pull [<name>]
-
- Supported version formats:
branch/<name>,commit/<hash>,^1.2.3,~1.2.3,1.2.3(seecmach dephelp for details); note:cmach dep addvendors dependencies immediately.
Workspace note (this repo): Prefer editing the mach-std/ repository directly rather than the vendored copy under dep/mach-std/.
If you need the compiler to use a local copy of the standard library for testing, temporarily switch the dependency to local from the consuming project (e.g., the top-level mach repo or a scratch project), not from inside the mach-std repository itself:
cmach dep add --local /ABS/PATH/TO/mach-std mach-std
Revert before committing:
cmach dep del mach-std
# or re-add the canonical remote/version
cmach dep add <remote-or-path> mach-std --version <version>
Editing the boot compiler (C)
- Files under
boot/*are the bootstrap compiler implementation in C. If you modify them, runclang-formatwhere available to keep formatting consistent.
When to pause / escalate
- If a change would affect Mach language syntax, semantics, or public stdlib APIs, pause and discuss with maintainers before proceeding.
Example workflows (quick)
- Build bootstrap compiler and intermediate compiler:
make cmach
make imach
- Build full pipeline (note scaffolding):
make mach
- Build a specific target and run it:
out/bin/cmach build . -o out/bin/<file>
out/bin/cmach run . arg1 arg2
# to select a specific target defined in mach.toml:
out/bin/cmach run --target <name> . arg1 arg2
Where to find more
- Language reference and deeper docs:
doc/* - Style and contribution notes: repository
READMEanddocfiles.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-02-04
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!