Skip to content

ci: add Rust CI workflow, cargo-deny and typos config (closes #19) - #20

Merged
danielhuici merged 5 commits into
reverseame:apotheosis2from
Dani-giron:g1-ci-cleanup-and-workflow
Jul 21, 2026
Merged

ci: add Rust CI workflow, cargo-deny and typos config (closes #19)#20
danielhuici merged 5 commits into
reverseame:apotheosis2from
Dani-giron:g1-ci-cleanup-and-workflow

Conversation

@Dani-giron

Copy link
Copy Markdown

Summary

The CI workflow was left over from an earlier Python version of the project (sets up Python 3.9, runs unittest) and did not build, test or lint any Rust code. It also did not trigger on the apotheosis2 branch.

Changes

  • cargo fmt applied to hnsw.rs and record.rs (mechanical, no logic changes) and every clippy warning fixed across src/, verified one by one (details in individual commits). Both were prerequisites: a fmt/clippy CI job added on top of unformatted or warning-producing code would fail on day one.
  • Cargo.toml: added rust-version = "1.88", the version that stabilizes let-chains, used by some of the clippy fixes.
  • .github/workflows/ci.yml: replaced with a Rust pipeline (fmt, clippy, test, release build, cargo-deny, cross-platform check, typos, MSRV, docs), triggered on the apotheosis2 branch.
  • deny.toml: license and advisory policy for cargo-deny.
  • _typos.toml: exceptions for the two Spanish words in README's Funding support section (Estratégicos, Ciberseguridad), which the English dictionary would otherwise flag.

Test plan

  • cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --all-features, cargo build --release --all-features and cargo doc --no-deps --all-features (with RUSTDOCFLAGS=-D warnings) all pass locally.
  • cargo-deny and typos-cli could not be installed locally (unrelated toolchain issue); not verified locally, will be validated by the CI run itself on this PR.

Closes #19

@danielhuici

danielhuici commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Here we are modifying critical part of the code. Could you check that the construction and query times have not been incremented? This is, compare times before and after this commits

@Dani-giron

Copy link
Copy Markdown
Author

Ran test_numbers (release build), two runs each before and after this
PR's clippy fixes (base commit 66455fd vs this branch).
Before: construction 3.358s / 3.458s, queries 145.95ms / 142.38ms
After: construction 3.197s / 3.322s, queries 141.96ms / 141.16ms
Matches: 5000/5000 in all four runs (correctness unchanged).
No regression: the before/after ranges overlap with the run-to-run variance seen within the same commit, if anything slightly faster after. Full terminal output in the next comment.

@Dani-giron

Copy link
Copy Markdown
Author

Before (66455fd) - run 1:

HNSW Model created in: 3.3579866s
Matches: 5000/5000
Queries took: 145.9505ms

Before (66455fd) - run 2:

HNSW Model created in: 3.4579097s
Matches: 5000/5000
Queries took: 142.3787ms

After (this branch) - run 1:

HNSW Model created in: 3.1969212s
Matches: 5000/5000
Queries took: 141.9565ms

After (this branch) - run 2:

HNSW Model created in: 3.3216627s
Matches: 5000/5000
Queries took: 141.1579ms

@reverseame reverseame deleted a comment from Dani-giron Jul 21, 2026
@danielhuici

Copy link
Copy Markdown
Collaborator

Looks good to me

@danielhuici
danielhuici merged commit 1c7b134 into reverseame:apotheosis2 Jul 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants