This repository contains Advent of Code solutions by EagleLizard.
Advent of Code 2023 solutions are in the ./2023
directory.
Solutions are created in Typescript + NodeJS and Rust.
It's recommended to use nvm to manage node
and npm
versions.
- NodeJS @
v21.4.0
- Typescript @
v5.3.2
In the 2023
directory, install dependencies:
npm i
If you have typescript installed globally, run:
tsc
Otherwise, you can prefix the command with npx
to use the binary installed in node_modules
:
npx tsc
To run the compiler in watch mode:
tsc -w
After compiling, the transpiled JS code will be in the dist
folder.
Run the program by executing the main.js
file with node
:
node dist/main.js
It's recommended to use rustup
to manage versions, see Rust's official Getting Started page for installation instructions.
- cargo @
1.72.1
To use the Makefile and run the project in watch mode, install cargo-watch
:
cargo install cargo-watch
In the 2023
directory, run:
cargo build
If you built the executable already via the previous section, you can run:
./target/debug/aoc2023
Alternatively, you can build and run the project using:
cargo watch -x run
You can also run in watch mode using:
make watch
On MacOS, uses g++
which is an alias to clang
.
- cmake @
3.27.7
- fswatch @
1.17.1
To use the Makefile and run the project in watch mode, install fswatch
:
brew install fswatch
In the 2023
directory, run:
make build-cpp
If you built the executable already via the previous section, you can run:
./cpp-out/aoc2023cpp
Alternatively, you can build and run the project using:
make run-cpp
You can also run in watch mode using:
make watch-cpp