src/main.zig
Purpose
Process entrypoint for the SydraDB binary.
Imports
std– Zig standard librarysydra/server.zig– CLI dispatch + runtime orchestrationsydra/alloc.zig– allocator handle wrapper
Public API
pub fn main() !void
High-level behavior:
- Initializes
alloc_mod.AllocatorHandle. - Prints
sydraDB pre-alpha. - Calls
server.run(&alloc_handle).
Notes:
- The allocator handle must remain alive for the duration of
server.run. - All command-line behavior is implemented in
src/sydra/server.zig.
Code (excerpt)
src/main.zig
const std = @import("std");
const server = @import("sydra/server.zig");
const alloc_mod = @import("sydra/alloc.zig");
pub fn main() !void {
var alloc_handle = alloc_mod.AllocatorHandle.init();
defer alloc_handle.deinit();
std.debug.print("sydraDB pre-alpha\n", .{});
try server.run(&alloc_handle);
}