Skip to content

Add Rust Cargo integration helpers#620

Open
YH390389859 wants to merge 1 commit into
Spectral-Finance:mainfrom
YH390389859:feat/rust-cargo-integration
Open

Add Rust Cargo integration helpers#620
YH390389859 wants to merge 1 commit into
Spectral-Finance:mainfrom
YH390389859:feat/rust-cargo-integration

Conversation

@YH390389859
Copy link
Copy Markdown

Summary

Closes #100.

This adds initial Rust Cargo integration helpers for Lux-managed Rust projects:

  • add Lux.Rust and Lux.Rust.Cargo helpers
  • generate Lux-managed Cargo.toml manifests
  • safely patch dependency sections in existing manifests without rewriting unrelated Cargo.toml content
  • inspect dependencies against Cargo.lock data and optional version indexes
  • plan and run Cargo fetch/build/test commands
  • generate Cargo cache metadata and stable cache keys
  • include a minimal priv/rust scaffold and Rust Cargo guide

Notes

This intentionally does not try to replace Cargo's full dependency resolver or act as a complete TOML AST-preserving rewriter. The full manifest reader/writer is scoped to Lux-generated manifests, while the file-level dependency helpers patch only dependency sections to preserve workspace, target, binary, profile, and other unrelated manifest content.

Verification

  • mise exec -- mix format --check-formatted lib/lux/rust.ex lib/lux/rust/cargo.ex test/unit/lux/rust/cargo_test.exs mix.exs guides/language_support.md guides/language_support/rust_cargo.md
  • mise exec -- mix test test/unit/lux/rust/cargo_test.exs --include unit - 24 tests, 0 failures
  • mise exec -- mix test - 1 doctest, 4 properties, 1299 tests, 0 failures, 1288 excluded
  • mise exec rust@stable -- cargo check --manifest-path priv/rust/Cargo.toml
  • git diff --check

@YH390389859 YH390389859 force-pushed the feat/rust-cargo-integration branch from 8d8472c to 9e3abdd Compare May 21, 2026 10:10
@YH390389859 YH390389859 force-pushed the feat/rust-cargo-integration branch from 9e3abdd to 1037643 Compare May 21, 2026 10:11
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.

Cargo Package Management Integration $300

1 participant