Add a package manager: rex init/add/remove/get/update/deps

Packages come from git (a registry can be added later; a bare version in
rex.toml is reserved for it). rex.toml [deps] names them, rex.lock pins exact
commits, and run/build/check/test download what is missing. `import json`
reads the package's json.rex; package files get `@json...` module keys so they
never mix with the project's own files. Newest tag of the same major version
wins when packages disagree. The language server reads downloaded packages.
Docs: docs/14-packages.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Your NameandClaude Opus 5.5 committed 2026-11-16 10:30:11 +01:00
1 parent 300d767124
commit 15da1e2379
16 files changed
+1588 -61

No files matched your search

+3
View File
@@ -58,6 +58,9 @@ Klein/
import engine.engine // the same line works in game/app/main.rex and in any other file
```
`rex init` writes one for you. The same file lists the packages the project uses
(see [chapter 14](14-packages.md)).
Rex finds the nearest `rex.toml` above the file you run (and above each file you open in an
editor). Without one, imports are counted from the folder of the file you run, as above. With
one, even a file next to your main file is imported with its full path (`import game.app.util`).