Zig Bare Bones: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Bot: Replace deprecated source tag with syntaxhighlight)
Line 14:
 
=== build.zig ===
<sourcesyntaxhighlight lang="c">
const std = @import("std");
const Builder = @import("std").build.Builder;
Line 94:
run_step.dependOn(&run_cmd.step);
}
</syntaxhighlight>
</source>
 
=== src/main.zig ===
Line 220:
 
=== src/linker.ld ===
<sourcesyntaxhighlight lang="asm">
ENTRY(_start)
Line 247:
}
}
</syntaxhighlight>
</source>
 
=== src/grub.cfg ===
<sourcesyntaxhighlight lang="c">
menuentry "Zig Bare Bones" {
multiboot /boot/kernel.elf
}
</syntaxhighlight>
</source>
 
== Build ==
Line 260:
the command below:
 
<sourcesyntaxhighlight lang="bash">
$ zig build
</syntaxhighlight>
</source>
 
To boot our kernel, simply run this command:
 
<sourcesyntaxhighlight lang="bash">
$ zig build run
</syntaxhighlight>
</source>
 
[[Category: Bare bones tutorials]] [[Category:Zig]]