NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2037 most downloaded on crates.io
Helper crate for SPDX expressions
Last release 5 days ago
02 Oct 2026
Release timing varies
gaps range from 1 weeks to 6 months
Nearly every release is documented
notes for 41 of 41 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
42 releases · first in 2019
PR#98 cleaned up the error representation.
PR#96 fixed LicenseItem 's PartialEq and PartialOrd implementations to agree with its total ordering, resolving #95 .
One column per quarter.
PR#92 updated SPDX license list to 3.28.0 .
PR#90 changed this crate to default to no_std , unless the detection feature is enabled, closing PR#89 . Thanks @so-rose !
no_std, unless the detection feature is enabled, closing PR#89. Thanks @so-rose!MIT OR Apache2.0 to just Apache-2.0, as PR#84 merged external code that was only licensed under Apache-2.0. See #88 for the original raising of this mismatch.PR#87 fixed a code generation bug introduced in PR#86 that caused LicenseId::text() to return the incorrect license text.
PR#86 changes the license detection for GNU licenses (GPL, AGPL, LGPL, GFDL). In 0.13.0 they would be detected as their deprecated (eg. AGPL-3.0 ) var…
AGPL-3.0) variant due to the variants (root, -only, and -or-later) using the exact same license text. GNU licenses are now detected as the <root>-or-later version. This is an arbitrary decision, which I hope to not change, but if someone makes a convincing argument it could be.PR#84 resolved #67 by inlining the askalono crate to allow detection of license texts or headers from arbitrary text data. There are multiple features
askalono crate to allow detection of license texts or headers from arbitrary text data. There are multiple features flags associated with this new feature.ParseMode::allow_unknown. Unknown identifiers are either treated as LicenseRef-<unknown identifier> or AdditionRef-<unknown identifier> depending on their position. Unknown identifiers on positions that are invalid for either licenses or exceptions are still considered parse errors.PR#81 resolved #68 by adding support for the WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring) syntax. Thanks @weihanglo !
WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring) syntax. Thanks @weihanglo!PR#80 reverted a change introduced in PR#78 that would auto-fixup GNU licenses to their non-deprecated forms eg. GPL-2.0 => GPL-2.0-only . This is no…
Licensee::satisfies works for GNU licenses again, it now requires that the license ids match exactly. This is incredibly pedantic but means it's up to consumers if the want to have a smarter comparison, I just don't want to have to care about GNU licenses, ever.PR#78 added ParseMode::allow_deprecated , which will cause an error if a deprecated license identifier is used, false in LAX and true in STRICT .
ParseMode::allow_lower_case_operators, newer revisions of the SPDX spec allow all lower-case operators, making the option pointless.ParseMode::allow_deprecated, which will cause an error if a deprecated license identifier is used, false in LAX and true in STRICT.-only versions.Expression::canonicalize now always changes GNU licenses to be -only or -or-later as the bare identifiers are deprecated.LicenseId::version to retrieve the numeric version of the license if it has one.LicenseId::base to retrieve the base name of the license.gnu_license_id which attempts to retrieve the license id for a GNU license from its base identifier. This retrieves the -only or -or-later license that matches.Licensee::parse_mode, Licensee::parse now forwards to that function with ParseMode::STRICT.Reason::GnuPlusWithSuffix and Reason::DeprecatedLicenseId as errors.Licensee::satisfies would not properly allow some licenses if the version was not at the end when using a +, notably the BSD licenses have the version in the middle of the license id.Licensee::satisfies, at least to my best understanding.
| Licensee | GPL-1.0-only | GPL-1.0-or-later | GPL-2.0-only | GPL-2.0-or-later | GPL-3.0-only | GPL-3.0-or-later |
|---|---|---|---|---|---|---|
| GPL-1.0-only | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| GPL-1.0-or-later | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| GPL-2.0-only | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
| GPL-2.0-or-later | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
| GPL-3.0-only | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ |
| GPL-3.0-or-later | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ |
PR#74 update SPDX license list to 3.27.0.
PR#74 update SPDX license list to 3.26.0.
PR#72 update SPDX license list to 3.25.0.
PR#70 update SPDX license list to 3.24.0.
PR#65 update SPDX license list to 3.23.
PR#63 update SPDX license list to 3.22.
PR#61 updated the SPDX license list from 3.20 => 3.21.
PR#59 updated the SPDX license list from 3.19 => 3.20.
3.19 => 3.20.PR#57 updated the SPDX license list from 3.18 => 3.19.
3.18 => 3.19.PR#55 updated the SPDX license list from 3.14 => 3.18.
3.14 => 3.18.PR#51 updates the crates.io metadata for the crate.
PR#50 changed ParseMode to be a struct with several fields to give finer grained control over which parts of expression parsing/evaluation can be rela
PR#48 resolved #45 by making the original error string owned in the case of a parse error, simplifying the handling of errors. Thanks @hoijui!
PR#44 fixed the Display for various GNU licenses, since they are "special" and diverge from the SPDX spec for reasons. Thanks @mmurto!
Display for various GNU licenses, since they are "special" and diverge from the SPDX spec for reasons. Thanks @mmurto!text feature flag, which includes the full license and exception texts. They can be retrieved via LicenseId::text and ExceptionId::text respectively.Expression::minimized_requirements method which allows a set of potential licensees be reduced down to the minimum possible requirements for an expression.PR#41 added a NOASSERTION license. Hopefully this will become part of spec in the future.
PR#40 updated the SPDX license list from 3.11 => 3.14.
PR#38 fixed various clippy lints which also bumps the MSRV to 1.53.0. Previously, PR#37 had bumped the MSRV to 1.52 so now this crate will check the M
PR#37 removed the dependencies on regex and lazy_static used for parsing some license expression parts, which gives a nice compile speed up with no be
Renamed LicenseItem::SPDX => LicenseItem::Spdx and Token::SPDX => Token::Spdx.
LicenseItem::SPDX => LicenseItem::Spdx and Token::SPDX => Token::Spdx.Updated to version 3.11 of the SPDX license list
Update smallvec to fix an advisory
Added Expression::iter() which iterates over both the license requirements and the operators.
Expression::iter() which iterates over both the license requirements and the operators.Updated to version 3.8 of the SPDX license list
PR#19 added the #[non_exhaustive] attribute to the new ParseMode enum, which bumped the minimum required Rust version to use this crate to 1.40. PR#21
PR#19 Added ParseMode enum, which has a Lax variant that allows certain invalid license identifiers found in some crates on crates.io, as well as the
IS_COPYLEFT, IS_DEPRECATED, IS_FSF_LIBRE, and IS_OSI_APPROVED are no longer part of the public API
LicenseId::is_gnu to indicate the GNU licenses (GPL, AGPL, LGPL, GFDL), which use a different suffix format than all other licensesstd::error::Error is now (properly) implemented for error::ParseErrorLicenseReq not implements From<LicenseId>Lexer and Token can now be reached via the lexer moduleparser and expression are no longer part of the public APIIS_COPYLEFT, IS_DEPRECATED, IS_FSF_LIBRE, and IS_OSI_APPROVED are no longer part of the public APIGFDL* licenses are now marked as copyleftLicenseReq from a GNU license, the license identifier is converted into its base form, eg. GPL-2.0-or-later becomes GPL-2.0+ so that the GNU style license identifiers can be used just the same as all of the other ones. See this issue### Added - Impl Display for Licensee
Updated the list of licenses to version 3.7 of the SPDX license list
Added LicenseId::full_name which is the full name for the license, eg "MIT License" for the "MIT" short identifier
LicenseId::full_name which is the full name for the license, eg "MIT License" for the "MIT" short identifier### Added - #9 Added a flag for determining if a license is considered copyleft. Thanks @kain88-de!
Added support for some of the metadata available from the SPDX format, namely "IsDeprecated", "IsFSFLibre", and "IsOSIApproved"
Expression which can parse and validate an SPDX license expression is
both syntactically and semantically correct, as well as evaluate the expression via
a user provided callbackInitial add of spdx crate, based primarily on `license-exprs`
license-exprs<!-- next-url --> [Unreleased]: https://github.com/EmbarkStudios/spdx/compare/0.13.6...HEAD [0.13.6]: https://github.com/EmbarkStudios/spdx/compare/0.13.5...0.13.6 [0.13.5]: https://github.com/EmbarkStudios/spdx/compare/0.13.4...0.13.5 [0.13.4]: https://github.com/EmbarkStudios/spdx/compare/0.13.3...0.13.4 [0.13.3]: https://github.com/EmbarkStudios/spdx/compare/0.13.2...0.13.3 [0.13.2]: https://github.com/EmbarkStudios/spdx/compare/0.13.1...0.13.2 [0.13.1]: https://github.com/EmbarkStudios/spdx/compare/0.13.0...0.13.1 [0.13.0]: https://github.com/EmbarkStudios/spdx/compare/0.12.0...0.13.0 [0.12.0]: https://github.com/EmbarkStudios/spdx/compare/0.11.1...0.12.0 [0.11.1]: https://github.com/EmbarkStudios/spdx/compare/0.11.0...0.11.1 [0.11.0]: https://github.com/EmbarkStudios/spdx/compare/0.10.9...0.11.0 [0.10.9]: https://github.com/EmbarkStudios/spdx/compare/0.10.9...0.10.9 [0.10.9]: https://github.com/EmbarkStudios/spdx/compare/0.10.8...0.10.9 [0.10.8]: https://github.com/EmbarkStudios/spdx/compare/0.10.7...0.10.8 [0.10.7]: https://github.com/EmbarkStudios/spdx/compare/0.10.6...0.10.7 [0.10.6]: https://github.com/EmbarkStudios/spdx/compare/0.10.5...0.10.6 [0.10.4]: https://github.com/EmbarkStudios/spdx/compare/0.10.3...0.10.4 [0.10.3]: https://github.com/EmbarkStudios/spdx/compare/0.10.2...0.10.3 [0.10.2]: https://github.com/EmbarkStudios/spdx/compare/0.10.1...0.10.2 [0.10.1]: https://github.com/EmbarkStudios/spdx/compare/0.10.0...0.10.1 [0.10.0]: https://github.com/EmbarkStudios/spdx/compare/0.9.0...0.10.0 [0.9.0]: https://github.com/EmbarkStudios/spdx/compare/0.8.1...0.9.0 [0.8.1]: https://github.com/EmbarkStudios/spdx/compare/0.8.0...0.8.1 [0.8.0]: https://github.com/EmbarkStudios/spdx/compare/0.7.0...0.8.0 [0.7.0]: https://github.com/EmbarkStudios/spdx/compare/0.6.2...0.7.0 [0.6.2]: https://github.com/EmbarkStudios/spdx/compare/0.6.1...0.6.2 [0.6.1]: https://github.com/EmbarkStudios/spdx/compare/0.6.0...0.6.1 [0.6.0]: https://github.com/EmbarkStudios/spdx/compare/0.5.0...0.6.0 [0.5.0]: https://github.com/EmbarkStudios/spdx/compare/0.4.1...0.5.0 [0.4.1]: https://github.com/EmbarkStudios/spdx/compare/0.4.0...0.4.1 [0.4.0]: https://github.com/EmbarkStudios/spdx/compare/0.3.6...0.4.0 [0.3.6]: https://github.com/EmbarkStudios/spdx/compare/0.3.5...0.3.6 [0.3.5]: https://github.com/EmbarkStudios/spdx/compare/0.3.4...0.3.5 [0.3.4]: https://github.com/EmbarkStudios/spdx/compare/0.3.3...0.3.4 [0.3.3]: https://github.com/EmbarkStudios/spdx/compare/0.3.2...0.3.3 [0.3.2]: https://github.com/EmbarkStudios/spdx/compare/0.3.1...0.3.2 [0.3.1]: https://github.com/EmbarkStudios/spdx/compare/0.3.0...0.3.1 [0.3.0]: https://github.com/EmbarkStudios/spdx/compare/0.2.4...0.3.0 [0.2.4]: https://github.com/EmbarkStudios/spdx/compare/0.2.3...0.2.4 [0.2.3]: https://github.com/EmbarkStudios/spdx/compare/0.2.2...0.2.3 [0.2.2]: https://github.com/EmbarkStudios/spdx/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/EmbarkStudios/spdx/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/EmbarkStudios/spdx/compare/0.1.0...0.2.0 [0.1.0]: https://github.com/EmbarkStudios/spdx/releases/tag/0.1.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →