Skip to content

Support Git and external path Cargo package selection - #5

Merged
moloch-- merged 1 commit into
mainfrom
fix/rust-cargo-git-path-selection
Oct 16, 2026
Merged

moloch-- merged 1 commit into
mainfrom
fix/rust-cargo-git-path-selection

Conversation

@moloch--

@moloch-- moloch-- commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Select Git and non-workspace path dependencies from Cargo metadata while preserving workspace and registry selection.
  • Allow an optional exact package_id to disambiguate packages with the same source type, name, and version.
  • Reject selection when distinct Cargo package IDs share a manifest directory, since rustc invocations cannot be attributed to one ID safely.
  • Document the selectors and add a local Git/path end-to-end regression that verifies exact package IDs, transformed effects, sibling exclusion, and program output.
  • Reproduce the same-checkout Git ref collision and verify the wrapper rejects it before compilation.

Local verification

  • cargo fmt --manifest-path tools/rust-obfuscation/cargo-wrapper/Cargo.toml -- --check
  • cargo test --locked --manifest-path tools/rust-obfuscation/cargo-wrapper/Cargo.toml (11 passed)
  • python3 -B tests/obfuscation/rust/test_cargo_wrapper.py with the pinned Rust 1.99/LLVM 23 compiler
  • python3 -B tests/obfuscation/rust/test_cargo.py --online with the pinned Rust 1.99/LLVM 23 compiler and local LLVM tools

@moloch--
moloch-- force-pushed the fix/rust-cargo-git-path-selection branch from 7204ac5 to f4afbd4 Compare October 16, 2026 02:38
@moloch--
moloch-- merged commit ad22d9d into main Oct 16, 2026
5 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.

1 participant