Advent of Code 2022 via Zig
This repo contains my attempt at Advent of Code 2023 (https://adventofcode.com/2023).
Running
Requires Zig v0.12.0-dev.1769, 2023-12-01 (or later): https://ziglang.org/download/
$ zig build run
info: Usage: adventofcode-2023-zig [flags]
Flags:
-d, --day=int Advent calendar day. Number between 1 and 5
-p, --part=int Part of day, 1 or 2 (default 1)
$ zig build run -- --day 1
info: Running day 01 part 1
info: Sum = 54990
The code to run the different days are a bit overkill, but I wanted to try how far I could get with Zig's type system.
On the plus side, very far! On the down side, the LSP starts failing to understand quite quickly once you do some inline switches and comptime.
License
This repository is licensed under multiple licenses, following the REUSE specification (version 3.0).
- All Zig files uses BSD-3-Clause
- Some documentation uses CC-BY-4.0
- Other miscellaneous files uses CC0-1.0
See the file header or accompanying .license
file on a per-file basis
for a more exact answer.