v0.3.0: restructure directories

- src/        ← compiler/selfhost/  (canonical Bux compiler)
- bootstrap/  ← compiler/bootstrap/ (Nim bootstrap)
- lib/        ← library/std/        (standard library)
- rt/         ← library/runtime/    (C runtime)
- tests/      ← compiler/tests/     (unit tests)
- Remove _selfhost/ (built into build/selfhost/ now)
- Update all path references (Makefile, cli.nim, cli.bux, docs)
- Bump version to 0.3.0
This commit is contained in:
2026-06-06 04:53:39 +03:00
parent 0dade151d2
commit ac969b37c1
65 changed files with 68 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
# Bux v0.3.0 — Restructure directories
set -e
echo "=== Bux v0.3.0 Restructuring ==="
# Step 1: Move compiler/selfhost → src
echo "Moving compiler/selfhost → src/"
git mv compiler/selfhost src
# Step 2: Move compiler/bootstrap → bootstrap
echo "Moving compiler/bootstrap → bootstrap/"
git mv compiler/bootstrap bootstrap
# Step 3: Move library/std → lib
echo "Moving library/std → lib/"
git mv library/std lib
# Step 4: Move library/runtime → rt
echo "Moving library/runtime → rt/"
git mv library/runtime rt
# Step 5: Move compiler/tests/*.nim → tests/
echo "Moving compiler/tests/*.nim → tests/"
for f in compiler/tests/*.nim; do
git mv "$f" tests/
done
# Step 6: Remove empty/obsolete directories
echo "Removing _selfhost/"
rm -rf _selfhost
echo "Removing empty compiler/ and library/"
rmdir compiler/tests 2>/dev/null || true
rmdir compiler 2>/dev/null || true
rmdir library 2>/dev/null || true
echo "=== Done ==="
View File
View File
View File
View File
View File
View File
View File
View File
View File
+7
View File
@@ -0,0 +1,7 @@
[Package]
Name = "buxc2"
Version = "0.3.0"
Type = "bin"
[Build]
Output = "Bin"
+23
View File
@@ -0,0 +1,23 @@
// main.bux — Entry point for the Bux self-hosting compiler
module Main {
// C runtime for command-line args
extern func bux_argc() -> int;
extern func bux_argv(index: int) -> String;
extern func bux_alloc(size: uint) -> *void;
// Forward declaration from Cli module
func Cli_Run(args: *String, argCount: int) -> int;
func Main() -> int {
let count: int = bux_argc();
// Allocate array of String pointers
let args: *String = bux_alloc(count as uint * 8) as *String;
var i: int = 0;
while i < count {
args[i] = bux_argv(i);
i = i + 1;
}
return Cli_Run(args, count);
}
}
BIN
View File
Binary file not shown.