Refine setup
This commit is contained in:
parent
f4670e510f
commit
d64050a402
16 changed files with 4158 additions and 30 deletions
|
|
@ -1,5 +0,0 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
}
|
||||
|
||||
8
src/days/day01.zig
Normal file
8
src/days/day01.zig
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 01: Secret Entrance";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
const input = @embedFile("./input/day01.txt");
|
||||
}
|
||||
|
||||
7
src/days/day02.zig
Normal file
7
src/days/day02.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 02";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day03.zig
Normal file
7
src/days/day03.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 03";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day04.zig
Normal file
7
src/days/day04.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 04";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day05.zig
Normal file
7
src/days/day05.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 05";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day06.zig
Normal file
7
src/days/day06.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 06";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day07.zig
Normal file
7
src/days/day07.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 07";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day08.zig
Normal file
7
src/days/day08.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 08";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day09.zig
Normal file
7
src/days/day09.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 09";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day10.zig
Normal file
7
src/days/day10.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 10";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day11.zig
Normal file
7
src/days/day11.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 11";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
7
src/days/day12.zig
Normal file
7
src/days/day12.zig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub const title = "Day 12";
|
||||
|
||||
pub fn run(_: std.mem.Allocator) !void {
|
||||
}
|
||||
|
||||
4035
src/days/input/day01.txt
Executable file
4035
src/days/input/day01.txt
Executable file
File diff suppressed because it is too large
Load diff
15
src/main.zig
Normal file
15
src/main.zig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const std = @import("std");
|
||||
|
||||
const day = @import("day");
|
||||
|
||||
pub fn main() !void {
|
||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
||||
defer arena.deinit();
|
||||
|
||||
const allocator = arena.allocator();
|
||||
|
||||
std.debug.print("{s}\n", .{day.title});
|
||||
try day.run(allocator);
|
||||
std.debug.print("\n", .{});
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue