From 3c68a58875a3f3984b5d3bc6e78ba267370285f4 Mon Sep 17 00:00:00 2001 From: Sage Hane Date: Wed, 5 May 2021 03:43:51 +0900 Subject: [PATCH] Display the actual version of Zig used for compilation --- hellos.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hellos.zig b/hellos.zig index 1a300ba..a832722 100644 --- a/hellos.zig +++ b/hellos.zig @@ -1,3 +1,4 @@ +const std = @import("std"); const builtin = @import("builtin"); const MultiBoot = packed struct { @@ -34,8 +35,10 @@ pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn } fn kmain() void { + const message = std.fmt.comptimePrint("Hello Kernel World from Zig {}!", .{builtin.zig_version}); + terminal.initialize(); - terminal.write("Hello, Kernel World from Zig 0.7.1!"); + terminal.write(message); } // Hardware text mode color constants