feat: HTTP registry, app/bench harnesses, and DWARF #line maps

Ship QUALITY_PLAN sessions 31–33: fetchable package index URLs, showcase
app and micro/nexus benchmarks, and debugger-friendly C codegen.

- Registry: BUX_REGISTRY accepts http(s) URLs (curl/wget → ~/.bux/cache)
- E.2: make test-apps smoke for nexus/boko/simpledb/jwt-pitbul
- E.5: benches/micro + C/Nim/Zig twins; make bench-nexus (wrk)
- E.4: HIR locs → #line .bux; default -O0 -g; --release -O2; make test-dwarf
This commit is contained in:
2026-07-19 22:46:45 +03:00
parent 53b43b0f79
commit eb81856565
26 changed files with 983 additions and 52 deletions
+22
View File
@@ -0,0 +1,22 @@
// Zig twin of benches/c/int_loop.c — 1e6 integer arithmetic loop
// Build: zig build-exe -OReleaseFast -femit-bin=build/int_loop int_loop.zig
const std = @import("std");
fn nowUs() i64 {
return @divTrunc(@as(i64, @intCast(std.time.nanoTimestamp())), 1000);
}
pub fn main() !void {
const iters: i32 = 1_000_000;
var acc: i32 = 0;
const t0 = nowUs();
var i: i32 = 0;
while (i < iters) : (i += 1) {
acc = acc + i * 3 - 1;
}
const t1 = nowUs();
if (acc == 0 and iters > 0) return error.Unreachable;
const total = t1 - t0;
const out = std.io.getStdOut().writer();
try out.print("BENCH int_loop iters={d} total_us={d} us_per_op={d}\n", .{ iters, total, @divTrunc(total, iters) });
}