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

+4 -2
View File
@@ -65,8 +65,10 @@ error: age cannot be negative
closures, maps, characters, modules.
- **C and C++ libraries.** `import "raylib.h"` and call it: Rex reads the header itself,
links the library, and builds your own `.c`/`.cpp` files next to the program.
- **Tooling included.** A formatter, a language server, and editor files, all in the one `rex`
program.
- **Packages from git.** `rex add git.joji.li/joji/json`, then `import json`. Exact versions are
kept in `rex.lock`; `rex update` moves to newer ones when you ask.
- **Tooling included.** A formatter, a language server, a package manager and editor files, all
in the one `rex` program.
## Get started