53b43b0f79
Ship the QUALITY_PLAN stretch from ownership through ecosystem: C.1 lifetime elision (bootstrap + selfhost), bux fmt/test/doc CI hooks, stdlib goldens, package registry (bux search/add), and LSP 0.4 position-sensitive locals with inferred let types. Full-tree format pass plus Map/Set remove double-free fix.
24 lines
686 B
Plaintext
24 lines
686 B
Plaintext
// 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);
|
|
}
|
|
}
|