Skip to content

Commit f426d6d

Browse files
Scaffold Cargo workspace with post-01 placeholder crate
Initial structure for the Rust via Project Euler series: - Cargo workspace with posts/post-01-multiples-of-3-and-5/ as the first crate - Three binaries (beginner/medium/expert) wired to a shared lib with placeholder solutions; Post 1 will replace them with the real three-level walk - criterion bench harness + correctness test verifying the Euler answer (233168) - rust-toolchain.toml pinning to rustc 1.95.0 for reproducible numbers - GitHub Actions CI: fmt, clippy (warnings as errors), tests, bench compile - results.json stub recording benchmark hardware (Apple M5, 10c, 24GB, macOS 26.2) - Dual MIT/Apache-2.0 license, README explaining reproduction flow
0 parents  commit f426d6d

16 files changed

Lines changed: 1020 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: -D warnings
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install pinned toolchain (rust-toolchain.toml)
20+
run: rustup show active-toolchain || rustup toolchain install
21+
22+
- uses: Swatinem/rust-cache@v2
23+
24+
- name: Check formatting
25+
run: cargo fmt --all -- --check
26+
27+
- name: Clippy
28+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
29+
30+
- name: Tests
31+
run: cargo test --workspace --all-targets
32+
33+
- name: Compile benches (CI numbers are not canonical — local runs populate results.json)
34+
run: cargo bench --workspace --no-run

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/target
2+
.DS_Store
3+
*.swp
4+
/.idea/
5+
/.vscode/

0 commit comments

Comments
 (0)