Skip to content

Commit 7e7a72e

Browse files
authored
Initial commit
0 parents  commit 7e7a72e

35 files changed

+2874
-0
lines changed

.assets/banner.png

61.3 KB
Loading

.assets/christmas_ferris.png

70.4 KB
Loading

.cargo/config.toml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[alias]
2+
today = "run --quiet --release --features today -- today"
3+
scaffold = "run --quiet --release -- scaffold"
4+
download = "run --quiet --release -- download"
5+
read = "run --quiet --release -- read"
6+
7+
solve = "run --quiet --release -- solve"
8+
all = "run --quiet --release -- all"
9+
time = "run --quiet --release -- time"
10+
11+
[env]
12+
AOC_YEAR = "2024"

.devcontainer/devcontainer.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "rust-devcontainer",
3+
"image": "mcr.microsoft.com/devcontainers/rust:latest",
4+
"postCreateCommand": "rustc --version",
5+
"remoteUser": "vscode"
6+
}

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.txt]
13+
insert_final_newline = false
14+
trim_trailing_whitespace = false
15+
16+
[*.md]
17+
trim_trailing_whitespace = false

.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Continuous Integration
2+
3+
on: push
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
ci:
10+
runs-on: ubuntu-latest
11+
name: Continuous Integration
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up cargo cache
15+
uses: actions/cache@v4
16+
continue-on-error: false
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
25+
restore-keys: ${{ runner.os }}-cargo-
26+
- name: cargo test
27+
run: cargo test
28+
# uncomment to enable clippy linter
29+
# - name: cargo clippy
30+
# run: cargo clippy -- -D warnings
31+
# uncomment to enable format linter
32+
# - name: cargo fmt
33+
# run: cargo fmt --check

.github/workflows/readme-stars.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Update readme ⭐️ progress
2+
3+
on:
4+
# !Please set a different minute than 51 if you enable this!
5+
# schedule:
6+
# - cron: "51 */6 * * *" # Every 6 hours
7+
workflow_dispatch:
8+
9+
jobs:
10+
update-readme:
11+
runs-on: ubuntu-latest
12+
if: ${{ vars.AOC_ENABLED == 'true' }}
13+
permissions:
14+
contents: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: k2bd/advent-readme-stars@v1
18+
with:
19+
userId: ${{ secrets.AOC_USER_ID }}
20+
sessionCookie: ${{ secrets.AOC_SESSION }}
21+
year: ${{ secrets.AOC_YEAR }}
22+
- uses: stefanzweifel/git-auto-commit-action@v5
23+
with:
24+
commit_message: "update readme progress"

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
13+
# Added by cargo
14+
15+
/target
16+
17+
# Advent of Code
18+
# @see https://old.reddit.com/r/adventofcode/comments/k99rod/sharing_input_data_were_we_requested_not_to/gf2ukkf/?context=3
19+
20+
data/inputs/*
21+
!data/inputs/.keep
22+
data/puzzles/*
23+
!data/puzzles/.keep
24+
25+
# Dhat
26+
dhat-heap.json
27+
28+
# Benchmarks
29+
30+
data/timings.json

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"vadimcn.vscode-lldb",
4+
"rust-lang.rust-analyzer",
5+
"editorConfig.editorConfig"
6+
]
7+
}

.vscode/launch.json

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "Debug unit tests for a solution",
11+
"cargo": {
12+
"args": [
13+
"test",
14+
"--no-run",
15+
// replace with binary name (e.g. "01") here if you always
16+
// want to debug one file regardless of the active file in
17+
// the editor.
18+
"--bin=${fileBasenameNoExtension}",
19+
"--package=advent_of_code"
20+
],
21+
},
22+
"args": [],
23+
"cwd": "${workspaceFolder}"
24+
},
25+
{
26+
"type": "lldb",
27+
"request": "launch",
28+
"name": "Debug a solution",
29+
"cargo": {
30+
"args": [
31+
"build",
32+
// replace with binary name (e.g. "01") here if you always
33+
// want to debug one file regardless of the active file in
34+
// the editor
35+
"--bin=${fileBasenameNoExtension}",
36+
"--package=advent_of_code"
37+
],
38+
},
39+
"cwd": "${workspaceFolder}"
40+
},
41+
{
42+
"type": "lldb",
43+
"request": "launch",
44+
"name": "Debug unit tests in library 'advent_of_code'",
45+
"cargo": {
46+
"args": [
47+
"test",
48+
"--no-run",
49+
"--lib",
50+
"--features=test_lib",
51+
"--package=advent_of_code"
52+
],
53+
"filter": {
54+
"name": "advent_of_code",
55+
"kind": "lib"
56+
}
57+
},
58+
"args": [],
59+
"cwd": "${workspaceFolder}"
60+
}
61+
]
62+
}

0 commit comments

Comments
 (0)