Skip to content

Compile the Rust quickstart as a real crate - #203

Open
midenotch wants to merge 3 commits into
wraith-protocol:developfrom
midenotch:compile-rust
Open

midenotch wants to merge 3 commits into
wraith-protocol:developfrom
midenotch:compile-rust

Conversation

@midenotch

@midenotch midenotch commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #189


Summary

Related Issue

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring
  • Other (please describe):

Changes Made

Testing

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated (if applicable)
  • Tests added/updated (if applicable)
  • No new warnings or errors
  • Commit messages follow conventional commits
  • Author and committer identity match GitHub account

@midenotch
midenotch requested a review from truthixify as a code owner October 17, 2026 20:21
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@midenotch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify truthixify 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.

The required snippet job fails before the new crate checks run: removing no-check makes the existing extended checker compile six dependent fragments as standalone rustc files, producing unresolved imports/types. The crate is also a manually duplicated copy rather than being built from or checked against the published fences, so the docs can drift while CI stays green. Make the existing checker pass and add deterministic extraction or a drift assertion tying the crate sources to the documented code.

@midenotch

Copy link
Copy Markdown
Contributor Author

The required snippet job fails before the new crate checks run: removing no-check makes the existing extended checker compile six dependent fragments as standalone rustc files, producing unresolved imports/types. The crate is also a manually duplicated copy rather than being built from or checked against the published fences, so the docs can drift while CI stays green. Make the existing checker pass and add deterministic extraction or a drift assertion tying the crate sources to the documented code.

done,

  • scripts/check-rust-quickstart.ts (new) — extracts every // src/ fence from guides/quickstarts/rust.mdx, byte-compares against snippets/rust-quickstart/src/ (stripping crate-only-begin/end regions), compares Cargo.toml structurally, fails on stale exemptions and uncovered crate sources. --emit <file.rs> prints the crate source ready to paste.
  • check-snippets-extended.ts — rust crate fences are excluded from standalone rustc (they'd fail on crate-internal imports) and reported separately; also fixed a real CRLF bug in the TOML linter (/#.*$/ can't match across \r).
  • Guide regenerated from the crate — 8 crate fences (network, keypair, main, stealth×5) now byte-match the crate; scan.rs/send.rs stay no-check with fixed import paths; the Cargo.toml fence is now checked.
  • Crate — main.rs simplified (no crate-only fixture reference in documented code); cargo build, cargo test (6/6), cargo fmt --check, and new cargo check --features testnet,network all pass — scan/send stubs are now type-checked in CI too.
  • Wiring — package.json (check:rust-quickstart, chained into check:snippets-extended), workflow step, and a full CONTRIBUTING.md section documenting the contract.

@midenotch midenotch mentioned this pull request Oct 22, 2026
9 of 13 tasks

@truthixify truthixify 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.

Two required snippet jobs remain red on this exact head. The extended Rust job pins Rust/Cargo 1.78 while the resolved base64ct 1.8.3 package requires edition 2024, and Compile docs snippets invokes the missing check:integration-guides package script. Align the toolchain with the committed lockfile, restore the script after the rebase, and rerun all required checks.

…llar-testnet-snippet-validation-blocking

ci(stellar): make testnet snippet validation blocking (wraith-protocol#187)

@truthixify truthixify 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.

The required extended-snippet workflow is still guaranteed to fail on current head a8b45ab. .github/workflows/snippets.yml:100-104 pins Rust/Cargo 1.78, while the committed lockfile resolves edition-2024 packages (including base64ct 1.8.3 and zeroize_derive 1.5.0). I reproduced the incompatibility with the newer Cargo 1.79: it fails parsing zeroize_derive because edition2024 is not stabilized, so 1.78 cannot build this graph either.

Raise the workflow toolchain to a compatible pinned release (at least 1.85; 1.89 already exists elsewhere in this docs workflow family) or pin a dependency graph compatible with 1.78. The extraction checks, current-toolchain Cargo check/tests (6 tests), and formatting pass locally. This head also conflicts with develop, so GitHub has not exercised the required jobs.

@midenotch
midenotch force-pushed the compile-rust branch 2 times, most recently from 4b4e86d to 8914cc9 Compare October 22, 2026 10:44
@midenotch

Copy link
Copy Markdown
Contributor Author

The required extended-snippet workflow is still guaranteed to fail on current head a8b45ab. .github/workflows/snippets.yml:100-104 pins Rust/Cargo 1.78, while the committed lockfile resolves edition-2024 packages (including base64ct 1.8.3 and zeroize_derive 1.5.0). I reproduced the incompatibility with the newer Cargo 1.79: it fails parsing zeroize_derive because edition2024 is not stabilized, so 1.78 cannot build this graph either.

Raise the workflow toolchain to a compatible pinned release (at least 1.85; 1.89 already exists elsewhere in this docs workflow family) or pin a dependency graph compatible with 1.78. The extraction checks, current-toolchain Cargo check/tests (6 tests), and formatting pass locally. This head also conflicts with develop, so GitHub has not exercised the required jobs.

fixed

@midenotch midenotch mentioned this pull request Oct 22, 2026
8 of 13 tasks

@truthixify truthixify 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.

Reviewed exact head fb1f71b. The Rust quickstart is tied to the published fences by the extraction/drift checker, the workflow now uses Rust 1.89 for the edition-2024 dependency graph, and every required docs check is green. Local workflow-equivalent Cargo build, network-feature check, formatting, and six unit tests passed.

@truthixify

Copy link
Copy Markdown
Contributor

Exact head fb1f71b passed review and the security preflight, and I approved it. PR #205 merged immediately before this merge attempt, so GitHub now reports this branch as conflicting with develop. Please rebase onto the current develop branch while preserving the Rust 1.89 workflow and quickstart drift checks; I will recheck the new head.

This branch has not been deployed

No deployments
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.

[Wave 10] Compile the Rust quickstart as a real crate

2 participants