housekeeping - thx sora

This commit is contained in:
2025-12-01 23:43:17 +01:00
parent ddad7cbf8b
commit 089a5a3c9d
3 changed files with 4449 additions and 46 deletions

View File

@@ -35,10 +35,11 @@ pub fn build(b: *std.Build) void {
// intend to expose to consumers that were defined in other files part
// of this module, you will have to make sure to re-export them from
// the root file.
.root_source_file = b.path("src/root.zig"),
.root_source_file = b.path("src/main.zig"),
// Later on we'll use this module as the root module of a test executable
// which requires us to specify a target.
.target = target,
.optimize = optimize,
});
// Here we define an executable. An executable needs to have a root module
@@ -59,28 +60,7 @@ pub fn build(b: *std.Build) void {
// don't need and to put everything under a single module.
const exe = b.addExecutable(.{
.name = "aoc25",
.root_module = b.createModule(.{
// b.createModule defines a new module just like b.addModule but,
// unlike b.addModule, it does not expose the module to consumers of
// this package, which is why in this case we don't have to give it a name.
.root_source_file = b.path("src/main.zig"),
// Target and optimization levels must be explicitly wired in when
// defining an executable or library (in the root module), and you
// can also hardcode a specific target for an executable or library
// definition if desireable (e.g. firmware for embedded devices).
.target = target,
.optimize = optimize,
// List of modules available for import in source files part of the
// root module.
.imports = &.{
// Here "aoc25" is the name you will use in your source code to
// import this module (e.g. `@import("aoc25")`). The name is
// repeated because you are allowed to rename your imports, which
// can be extremely useful in case of collisions (which can happen
// importing modules from different packages).
.{ .name = "aoc25", .module = mod },
},
}),
.root_module = mod,
});
// This declares intent for the executable to be installed into the