1
0
Fork
You've already forked zig-aoc-2020
0
My stuff for the advent of code, done with zig. Based off of https://github.com/SpexGuy/Zig-AoC-Template/
  • Zig 100%
2021年04月07日 11:35:34 +02:00
.vscode Initial Template 2020年11月26日 15:46:03 -06:00
src add command line arguments for choosing parts 2021年04月07日 11:35:34 +02:00
.gitattributes Initial Template 2020年11月26日 15:46:03 -06:00
.gitignore Initial Template 2020年11月26日 15:46:03 -06:00
build.zig Initial Template 2020年11月26日 15:46:03 -06:00
input_day01 complete day01 2021年04月05日 10:59:43 +02:00
input_day02 complete day02 2021年04月05日 22:12:46 +02:00
LICENSE Initial Template 2020年11月26日 15:46:03 -06:00
README.md Initial Template 2020年11月26日 15:46:03 -06:00

Advent Of Code Zig Template

This repo provides a template for Advent of Code participants using Zig. It contains a main file for each day, a build.zig file set up with targets for each day, and Visual Studio Code files for debugging.

How to use this template:

The src/ directory contains a main file for each day. Put your code there. The build command zig build dayXX [target and mode options] -- [program args] will build and run the specified day. You can also use zig build install_dayXX [target and mode options] to build the executable for a day and put it into zig-cache/bin without executing it. By default this template does not link libc, but you can set should_link_libc to true in build.zig to change that. If you have files with tests, add those files to the list of test files in build.zig. The command zig build test will run tests in all of these files.

This repo also contains Visual Studio Code project files for debugging. These are meant to work with the C/C++ plugin. There is a debug configuration for each day. By default all days are built in debug mode, but this can be changed by editing .vscode/tasks.json if you have a need for speed.

If you would like to contribute project files for other development environments, please send a PR.