spdx
Helper crate for SPDX expressions
0.13.5
21M downloads/mo
#2028 most downloaded on crates.io
EmbarkStudios/spdx
What this package is like to depend on
Last release 17 days ago
06 Aug 2026
Release timing varies
gaps range from 1 weeks to 6 months
Nearly every release is documented
notes for 40 of 40 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
41 releases · first in 2019
6 releases in the last 12 months
see the full history below
Release timeline
41 releases · Jun 2019 to Aug 2026Releases
latest 41-
0.13.506 Aug 2026 -
0.13.426 Feb 2026 -
0.13.317 Dec 2025Release notes
Open source →Changed
- PR#90 changed this crate to default to
no_std, unless thedetectionfeature is enabled, closing PR#89. Thanks @so-rose! - PR#91 changed the license terms from
MIT OR Apache2.0to justApache-2.0, as PR#84 merged external code that was only licensed underApache-2.0. See #88 for the original raising of this mismatch.
Release notes
Open source →Changed
- PR#90 changed this crate to default to
no_std, unless thedetectionfeature is enabled, closing PR#89. Thanks @so-rose! - PR#91 changed the license terms from
MIT OR Apache2.0to justApache-2.0, as PR#84 merged external code that was only licensed underApache-2.0. See #88 for the original raising of this mismatch.
- PR#90 changed this crate to default to
-
0.13.204 Dec 2025 -
0.13.103 Dec 2025Release notes
Open source →Changed
- 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) 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-laterversion. This is an arbitrary decision, which I hope to not change, but if someone makes a convincing argument it could be.
Release notes
Open source →Changed
- 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) 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-laterversion. This is an arbitrary decision, which I hope to not change, but if someone makes a convincing argument it could be.
- 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.
-
0.13.002 Dec 2025Release notes
Open source →Added
- PR#84 resolved #67 by inlining the
askalonocrate to allow detection of license texts or headers from arbitrary text data. There are multiple features flags associated with this new feature. - PR#85 resolved #82 by optionally allowing the parsing of unknown identifiers via
ParseMode::allow_unknown. Unknown identifiers are either treated asLicenseRef-<unknown identifier>orAdditionRef-<unknown identifier>depending on their position. Unknown identifiers on positions that are invalid for either licenses or exceptions are still considered parse errors.
Release notes
Open source →Added
- PR#84 resolved #67 by inlining the
askalonocrate to allow detection of license texts or headers from arbitrary text data. There are multiple features flags associated with this new feature. - PR#85 resolved #82 by optionally allowing the parsing of unknown identifiers via
ParseMode::allow_unknown. Unknown identifiers are either treated asLicenseRef-<unknown identifier>orAdditionRef-<unknown identifier>depending on their position. Unknown identifiers on positions that are invalid for either licenses or exceptions are still considered parse errors.
- PR#84 resolved #67 by inlining the
-
0.12.019 Aug 2025Release notes
Open source →Added
- PR#81 resolved #68 by adding support for the
WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring)syntax. Thanks @weihanglo!
Release notes
Open source →Added
- PR#81 resolved #68 by adding support for the
WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring)syntax. Thanks @weihanglo!
- PR#81 resolved #68 by adding support for the
-
0.11.111 Aug 2025Release notes
Open source →Changed
- PR#80 changed how
Licensee::satisfiesworks 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.
Fixed
Release notes
Open source →Changed
- PR#80 changed how
Licensee::satisfiesworks 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.
Fixed
- PR#80 changed how
-
0.11.008 Aug 2025Release notes
Open source →Changed
- PR#78 removed
ParseMode::allow_lower_case_operators, newer revisions of the SPDX spec allow all lower-case operators, making the option pointless. - PR#78 added
ParseMode::allow_deprecated, which will cause an error if a deprecated license identifier is used,falseinLAXandtrueinSTRICT. - PR#78 changed the various imprecise names for GPL licenses to be mapped to the non-deprecated
-onlyversions. - PR#78
Expression::canonicalizenow always changes GNU licenses to be-onlyor-or-lateras the bare identifiers are deprecated.
Added
- PR#78 added
LicenseId::versionto retrieve the numeric version of the license if it has one. - PR#78 added
LicenseId::baseto retrieve the base name of the license. - PR#78 added
gnu_license_idwhich attempts to retrieve the license id for a GNU license from its base identifier. This retrieves the-onlyor-or-laterlicense that matches. - PR#78 added
Licensee::parse_mode,Licensee::parsenow forwards to that function withParseMode::STRICT. - PR#78 added
Reason::GnuPlusWithSuffixandReason::DeprecatedLicenseIdas errors.
Fixed
- PR#78 fixed an issue where
Licensee::satisfieswould 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. - PR#78 fixed the handling of GNU licenses in
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 ❌ ✅ ❌ ✅ ✅ ✅
Release notes
Open source →Changed
- [PR#78] removed
ParseMode::allow_lower_case_operators, newer revisions of the SPDX spec allow all lower-case operators, making the option pointless. - [PR#78] added
ParseMode::allow_deprecated, which will cause an error if a deprecated license identifier is used,falseinLAXandtrueinSTRICT. - [PR#78] changed the various imprecise names for GPL licenses to be mapped to the non-deprecated
-onlyversions. - [PR#78]
Expression::canonicalizenow always changes GNU licenses to be-onlyor-or-lateras the bare identifiers are deprecated.
Added
- [PR#78] added
LicenseId::versionto retrieve the numeric version of the license if it has one. - [PR#78] added
LicenseId::baseto retrieve the base name of the license. - [PR#78] added
gnu_license_idwhich attempts to retrieve the license id for a GNU license from its base identifier. This retrieves the-onlyor-or-laterlicense that matches. - [PR#78] added
Licensee::parse_mode,Licensee::parsenow forwards to that function withParseMode::STRICT. - [PR#78] added
Reason::GnuPlusWithSuffixandReason::DeprecatedLicenseIdas errors.
Fixed
- [PR#78] fixed an issue where
Licensee::satisfieswould 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. - [PR#78] fixed the handling of GNU licenses in
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#78 removed
-
0.10.912 Jul 2025 -
0.10.831 Dec 2024 -
0.10.715 Nov 2024 -
0.10.631 May 2024 -
0.10.426 Feb 2024 -
0.10.304 Jan 2024 -
0.10.214 Jul 2023Release notes
Open source → -
0.10.106 Apr 2023 -
0.10.020 Dec 2022 -
0.9.025 Aug 2022 -
0.8.104 Feb 2022 -
0.8.021 Dec 2021 -
0.7.023 Nov 2021 -
0.6.221 Oct 2021Release notes
Open source →Fixed
- PR#44 fixed the
Displayfor various GNU licenses, since they are "special" and diverge from the SPDX spec for reasons. Thanks @mmurto!
Added
- PR#43 added the
textfeature flag, which includes the full license and exception texts. They can be retrieved viaLicenseId::textandExceptionId::textrespectively. - PR#43 added the
Expression::minimized_requirementsmethod which allows a set of potential licensees be reduced down to the minimum possible requirements for an expression.
- PR#44 fixed the
-
0.6.104 Oct 2021Release notes
Open source → -
0.6.016 Aug 2021 -
0.5.020 Jul 2021 -
0.4.114 Jun 2021 -
0.4.026 Mar 2021Release notes
Open source →Changed
- Renamed
LicenseItem::SPDX=>LicenseItem::SpdxandToken::SPDX=>Token::Spdx.
- Renamed
-
0.3.612 Feb 2021 -
0.3.512 Feb 2021 -
0.3.404 Mar 2020Release notes
Open source →Added
- Added
Expression::iter()which iterates over both the license requirements and the operators.
- Added
-
0.3.329 Feb 2020 -
0.3.229 Jan 2020 -
0.3.128 Jan 2020 withdrawn -
0.3.014 Dec 2019Release notes
Open source →Added
- Added
LicenseId::is_gnuto indicate the GNU licenses (GPL, AGPL, LGPL, GFDL), which use a different suffix format than all other licenses std::error::Erroris now (properly) implemented forerror::ParseErrorLicenseReqnot implementsFrom<LicenseId>
Changed
LexerandTokencan now be reached via thelexermoduleparserandexpressionare no longer part of the public APIIS_COPYLEFT,IS_DEPRECATED,IS_FSF_LIBRE, andIS_OSI_APPROVEDare no longer part of the public API- The
GFDL*licenses are now marked as copyleft
Fixed
- When creating a
LicenseReqfrom a GNU license, the license identifier is converted into its base form, eg.GPL-2.0-or-laterbecomesGPL-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
-
0.2.425 Nov 2019 -
0.2.307 Nov 2019Release notes
Open source →Changed
- Updated the list of licenses to version 3.7 of the SPDX license list
-
0.2.206 Nov 2019Release notes
Open source →Added
- Added
LicenseId::full_namewhich is the full name for the license, eg "MIT License" for the "MIT" short identifier
- Added
-
0.2.121 Oct 2019Release notes
Open source →Added
- #9 Added a flag for determining if a license is considered copyleft. Thanks @kain88-de!
-
0.2.003 Oct 2019Release notes
Open source →Added
- Added a
Expressionwhich can parse and validate an SPDX license expression is both syntactically and semantically correct, as well as evaluate the expression via a user provided callback - Added an update exe for pulling new SPDX information, copied from https://github.com/rust-lang-nursery/license-exprs
- Added support for some of the metadata available from the SPDX format, namely "IsDeprecated", "IsFSFLibre", and "IsOSIApproved"
Changed
- Uhm...everything. I hope no one was using 0.1.0.
- Use a better lexer, mostly copied from https://github.com/rust-lang-nursery/license-exprs/pull/29
- Added a
-
0.1.019 Jun 2019Release notes
Open source →Added
- Initial add of spdx crate, based primarily on
license-exprs
<!-- next-url --> [Unreleased]: https://github.com/EmbarkStudios/spdx/compare/0.13.5...HEAD [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
- Initial add of spdx crate, based primarily on