Skip to content

chore: inherit crate metadata from workspace and move to Rust 2024 edition#112

Open
aram356 wants to merge 3 commits into
mainfrom
worktree-crate-manifest-metadata
Open

chore: inherit crate metadata from workspace and move to Rust 2024 edition#112
aram356 wants to merge 3 commits into
mainfrom
worktree-crate-manifest-metadata

Conversation

@aram356

@aram356 aram356 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Closes #111

What

Two related manifest changes, based directly on main.

Crate metadata now lives in one place. [workspace.package] gains authors, edition, publish, and version (it previously carried only license), and every crate inherits those five keys via { workspace = true } instead of re-declaring version/edition/publish by hand. Each crate also gets a description, which none had before. Every [package] block now reads name, description, then the inherited keys, so a new crate has an obvious template to copy.

Workspace moves from the 2021 to the 2024 edition. Rust 1.95 is already pinned in .tool-versions, well past the 1.85 that stabilized the 2024 edition, so this is a one-line change in [workspace.package].

Source churn from the edition bump

The edition upgrade compiled with zero migration errors. The only source changes are mechanical and semantics-preserving — both applied by tooling, then reviewed by hand:

  • The 2024 style edition re-sorts imports so uppercase names sort first, e.g. use base64::{Engine as _, engine::general_purpose::STANDARD}. Applied by cargo fmt.
  • Let-chains are stable in 2024, so clippy's collapsible_if now fires on nested if let pairs in auction.rs and routes.rs. They become if let ... && let .... Applied by cargo clippy --fix.

Verification

All CI gates pass locally:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets — 161 passed, 0 failed
  • cargo check --workspace --all-targets --features "fastly cloudflare"

Note

mocktioneer-cli does not exist on main yet — it arrives with #110 — so it is deliberately not part of this PR. Once #110 merges, that crate should adopt the same inherited-metadata block; it is a one-line follow-up on that branch.

publish = false is now inherited workspace-wide, matching what every crate already set individually. If mocktioneer-core is ever published to crates.io it will need an explicit per-crate override.

…ition

Add authors, edition, publish, and version to [workspace.package] and have
every crate inherit them, so metadata lives in one place instead of being
re-declared per crate. Each [package] block is now name, description, then the
inherited keys. Descriptions are new.

Bump the workspace edition from 2021 to 2024. The upgrade compiled clean; the
only source churn is mechanical: the 2024 style edition re-sorts imports, and
clippy's collapsible_if now collapses nested if-let pairs into let-chains
(stable in 2024).
@aram356 aram356 force-pushed the worktree-crate-manifest-metadata branch from 82b9fb6 to 36fe9f1 Compare July 13, 2026 20:44
@aram356 aram356 self-assigned this Jul 13, 2026

@ChristianPavilonis ChristianPavilonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The workspace metadata inheritance and Rust 2024 migration are sound, the mechanical Rust rewrites preserve behavior, and all CI and local validation pass. The incorrect Spin target description is included inline.

P3 — Authoritative contributor guidance still declares Rust 2021 (CLAUDE.md:32)

The repository guidance says Edition: 2021, contradicting the new workspace edition. Contributors and automation are instructed to treat CLAUDE.md as authoritative, so the documented toolchain state should be updated to Edition: 2024. This comment is included here because CLAUDE.md is outside the PR diff and GitHub cannot attach an inline review comment to that line.

Comment thread crates/mocktioneer-adapter-spin/Cargo.toml Outdated
…dition 2024

The Spin description claimed wasm32-wasip2, but on main the adapter builds
wasip1: spin-sdk is 5.2, edgezero.toml declares wasm32-wasip1, and the CI
matrix runs the spin contract tests under wasip1 via wasmtime. wasip2 arrives
with the spin-sdk 6 migration in #110, which adds its own wasip2 CI entry.

Also update CLAUDE.md, which still declared Edition 2021.
@aram356

aram356 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Review addressed — both findings fixed in 19a1781

P2 — Spin metadata named the wrong WASI target. Correct, and applied verbatim. On main the Spin adapter builds wasm32-wasip1: spin-sdk is 5.2, edgezero.toml declares wasip1, and the CI matrix runs the Spin contract tests on wasip1 under wasmtime. I had copied the description from the feature branch's CLAUDE.md, which describes the post-#110 world — wasm32-wasip2 only arrives with the spin-sdk 6 migration in #110, which adds its own wasip2 CI matrix entry. Both targets are therefore CI-covered on the branch where each is real, so no new CI is needed for this PR. Thread resolved.

P3 — CLAUDE.md still declared Edition 2021. Fixed; it now reads **Edition**: 2024, so the authoritative contributor guidance matches the workspace. Thanks for raising it out-of-band given it was outside the diff — CLAUDE.md is in the diff now.

Re-verified on the updated branch: cargo fmt --all -- --check clean, cargo clippy --workspace --all-targets --all-features -- -D warnings clean, cargo test --workspace --all-targets 161 passed / 0 failed, and cargo metadata confirms every crate's description names the target it actually builds.

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.

chore: inherit crate metadata from workspace and move to Rust 2024 edition

2 participants