feat: restructure repo, borrow checker, expanded stdlib

- Reorganize repository to Rust-style layout:
  compiler/bootstrap/  compiler/selfhost/  compiler/tests/
  library/std/  library/runtime/  tests/  tools/
- Add buxs/ Windows-compatible project root
- Add borrow checker tests and implement:
  - Alias analysis (double mutable borrow detection)
  - Use-after-move detection for own T
- Expand standard library:
  - Std::Os: Args, Env, Cwd, Chdir
  - Std::Time: NowMs, NowUs, SleepMs
  - Std::Process: Run, Output
  - Std::Io: PrintInt64 (fixes 32-bit truncation bug)
- Add examples: os_time.bux, process.bux
- Fix PrintInt to use int64_t in C runtime
This commit is contained in:
2026-06-05 20:08:17 +03:00
parent a45a2ecd49
commit 9c6b516453
75 changed files with 581 additions and 79 deletions
+4 -4
View File
@@ -290,7 +290,7 @@ Phase 7.5 — Driver (depends on all):
**Goal:** Bux compiler compiles itself. This is the **main milestone**.
**All 14 modules ported** in `src_bux/` (4094 LOC total). Self-hosted project structure in `_selfhost/`.
**All 14 modules ported** in `compiler/selfhost/` (4094 LOC total). Self-hosted project structure in `_selfhost/`.
| Task | Status | Details | LOC |
|------|--------|---------|-----|
@@ -355,8 +355,8 @@ Pipeline modules:
**Bootstrap loop goal:**
```
buxc (Nim) → compile src_bux/*.bux → buxc2 (Bux binary)
buxc2 (Bux) → compile src_bux/*.bux → buxc3 (Bux binary)
buxc (Nim) → compile compiler/selfhost/*.bux → buxc2 (Bux binary)
buxc2 (Bux) → compile compiler/selfhost/*.bux → buxc3 (Bux binary)
compare buxc2 == buxc3 → SELF-HOSTED ✅
```
@@ -556,7 +556,7 @@ bux/
│ ├── Linker.bux # Custom linker / build driver
│ ├── Manifest.bux # bux.toml parser
│ └── Package.bux # Package resolution
├── stdlib/
├── library/
│ ├── Std/
│ │ ├── Io.bux
│ │ ├── Memory.bux