No description
  • Rust 99.2%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-15 09:37:15 -05:00
.husky ci: commitlint 2025-10-16 15:32:46 -04:00
apps feat: end of part 1 of day 10 2025-12-15 09:37:15 -05:00
libs feat: end of day 06 2025-12-06 15:17:39 -05:00
.commitlintrc.json chore: fix $schema value in .commitlintrc.json 2025-10-16 16:48:54 -04:00
.gitignore feat: end of day 05 2025-12-05 17:47:51 -05:00
.markdownlint.jsonc build: remove target-specific Makefile.toml files + other make & doc'n chores 2025-10-16 15:20:00 -04:00
Cargo.lock feat: input-reading for day 10 2025-12-14 23:30:43 -05:00
Cargo.toml feat: input-reading for day 10 2025-12-14 23:30:43 -05:00
Makefile.toml ci: commitlint 2025-10-16 15:32:46 -04:00
package-lock.json ci: commitlint 2025-10-16 15:32:46 -04:00
package.json ci: commitlint 2025-10-16 15:32:46 -04:00
README.md ci: commitlint 2025-10-16 15:32:46 -04:00

Advent of Code 2025

Rust multi-target workspace

This repository is organized as a Cargo workspace that can host multiple executable sub-projects (each producing its own binary).

Current apps (packages):

  • hello — prints "Hello world"
  • greet — prints a personalized greeting if you pass a name

Prerequisites:

Build all targets (development):

cargo build --workspace

Run a specific target:

# Hello world
cargo run -p hello --quiet

# Greet (optionally pass a name)
cargo run -p greet --quiet -- Alice

Expected outputs:

Hello world
Greetings, Alice!

Build release binaries for all targets:

cargo build --workspace --release

The binaries will be at:

  • macOS/Linux: target/release/hello, target/release/greet
  • Windows: target\\release\\hello.exe, target\\release\\greet.exe

Adding a new sub-project (executable)

  1. Create a new app folder with its own Cargo.toml and src/main.rs, e.g. apps/day01.
  2. Add its path to the members array in the root Cargo.toml workspace.
  3. Run it with cargo run -p day01.

Rust multi-target workspace

This repository is organized as a Cargo workspace that can host multiple executable sub-projects (each producing its own binary).

Current apps (packages):

  • hello — prints "Hello world"
  • greet — prints a personalized greeting if you pass a name

Prerequisites:

Build all targets (development):

cargo build --workspace

Run a specific target:

# Hello world
cargo run -p hello --quiet

# Greet (optionally pass a name)
cargo run -p greet --quiet -- Alice

Expected outputs:

Hello world
Greetings, Alice!

Build release binaries for all targets:

cargo build --workspace --release

The binaries will be at:

  • macOS/Linux: target/release/hello, target/release/greet
  • Windows: target\\release\\hello.exe, target\\release\\greet.exe

Adding a new sub-project (executable)

  1. Create a new app folder with its own Cargo.toml and src/main.rs, e.g. apps/day01.
  2. Add its path to the members array in the root Cargo.toml workspace.
  3. Run it with cargo run -p day01.

Using cargo-make tasks

This repo includes a Makefile.toml for cargo-make tasks.

Install cargo-make once:

cargo install cargo-make

Common tasks:

  • Build: cargo make build
  • Lint (clippy, fails on warnings): cargo make lint
  • Test (runs lint first, then tests): cargo make test

Notes:

  • Lint runs cargo clippy --workspace --all-targets --all-features -- -D warnings.
  • Test runs cargo test --workspace --all-targets --all-features and has a dependency on lint, so cargo make test will automatically lint first.

Commit message linting (commitlint)

This repository enforces Conventional Commits using commitlint.

Quick start:

  • Install Node.js (if not already installed): https://nodejs.org/
  • Install dev dependencies and set up hooks:
    • npm install
    • npm run prepare # installs Git hooks via Husky
  • Try a commit. The commit-msg hook will validate your message.

Manual runs / CI:

  • Using cargo-make (npx, no local deps required):
    • cargo make commitlint # checks the last 20 commits
  • Using npx directly:
    • npx --yes @commitlint/cli@latest --from HEAD~20 --to HEAD

Commit message format examples:

  • feat(greet): support passing multiple names
  • fix(hello): handle empty output on Windows
  • docs: add usage examples to README

See: https://www.conventionalcommits.org/