From 036d855e886f56f1a1c9e6b616d4650cccc4b7ce Mon Sep 17 00:00:00 2001 From: utox39 Date: Tue, 18 Mar 2025 10:41:13 +0100 Subject: [PATCH] refactor: rename root.zig to detection.zig --- src/detection.zig | 8 ++++++++ src/main.zig | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/detection.zig diff --git a/src/detection.zig b/src/detection.zig new file mode 100644 index 0000000..9d86371 --- /dev/null +++ b/src/detection.zig @@ -0,0 +1,8 @@ +const std = @import("std"); + +pub const os_module = switch (@import("builtin").os.tag) { + .linux => @import("linux/linux.zig"), + .macos => @import("macos/macos.zig"), + .windows => @import("windows/windows.zig"), + else => @compileError("Unsupported operating system"), +}; diff --git a/src/main.zig b/src/main.zig index 14aa2e6..112a99d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,5 +1,5 @@ const std = @import("std"); -const os_module = @import("root.zig").os_module; +const os_module = @import("detection.zig").os_module; pub fn main() !void { const stdout_file = std.io.getStdOut().writer();