blob: 5de5e7147bde231b218a12443782598db1c47ab8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// SPDX-FileCopyrightText: 2024 Himbeer <himbeer@disroot.org>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
const builtin = @import("builtin");
const root = @import("root");
pub const os = @import("os.zig");
fn _start() callconv(.C) noreturn {
if (!@hasDecl(root, "main")) @compileError("no main function");
root.main();
os.end();
}
comptime {
if (!builtin.is_test) @export(_start, .{ .name = "_start" });
}
|