Zig Bare Bones: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
(Created page with "{{Stub}} In this tutorial, we'll make a simple hello world kernel in Zig. == Prerequisites == First off, you'll need: * The Zig compiler, at least version 0.7.0 * [[GRUB]...")
 
No edit summary
Line 8:
 
== Code ==
If you done setting up all of the prerequisites above, we can now write
write some code for our kernel
 
=== build.zig ===
Line 122:
fn kmain() void {
console.initialize();
console.writeputs("Hello world!");
}
</source>
Line 240:
 
== Build ==
Now that our kernel code is done, we'll neednow build our kernel with theby commandrunning
the command below:
 
<source lang="bash">
$ zig build
</source>
 
To boot our kernel, simplesimply run this command:
 
<source lang="bash">
$ zig build run
Anonymous user