Expand description
Typed VersionConstraint — what versions a dependency accepts.
Adapters parse their native constraint syntax (cargo ^1.2.3,
npm >=1.2.3 <2.0.0, Bundler ~> 1.2.3, pip >=1.2,<2.0,
Composer ^1.2 || ^2.0, …) into this canonical typed shape.
The resolver in gen-engine reads this once + does its
version-selection math against it; per-adapter constraint logic
lives only at the parse boundary.
Structs§
- Compound
Constraint - Compound constraint container — disjunction / conjunction of
atomic
ConstraintSpecs. Kept separate fromConstraintSpecto avoid serde recursion-overflow on the derive macros (Vecinside a derived Serialize/Deserialize enum triggers a monomorphization storm). Most adapters never need this — the Range+Caret+Tildevariants cover ≥95% of real-world constraints. - Version
Constraint - Wrapper carrying both the typed
ConstraintSpecand the original native syntax — handy for diagnostics + round-tripping back to the source manifest.
Enums§
- Combinator
- Constraint
Spec - One typed variant per constraint kind every package manager
surfaces. Adapter is responsible for converting
~> 1.2.3etc. into the matching shape.