pub struct LicenseCompatibility;Expand description
License compatibility checker.
Determines whether two licenses can coexist in the same dependency tree based on their distribution requirements.
Implementations§
Source§impl LicenseCompatibility
impl LicenseCompatibility
Sourcepub fn is_compatible(a: &License, b: &License) -> bool
pub fn is_compatible(a: &License, b: &License) -> bool
Check if two licenses are compatible for co-distribution.
Rules:
- Proprietary is incompatible with GPL2, GPL3, and LGPL21.
- GPL3 is incompatible with GPL2 (GPL2-only cannot upgrade to GPL3).
- Permissive licenses (MIT, BSD, ISC, Apache2) are compatible with everything except Proprietary.
- Unknown licenses are treated as compatible (best-effort).