All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased - ReleaseDate
0.13.4 - 2026-02-26
0.13.3 - 2025-12-17
- 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.
0.13.2 - 2025-12-04
- PR#87 fixed a code generation bug introduced in PR#86 that caused
LicenseId::text()to return the incorrect license text.
0.13.1 - 2025-12-03
- 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.
0.13.0 - 2025-12-02
- 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.
0.12.0 - 2025-08-19
- PR#81 resolved #68 by adding support for the
WITH [%s"DocumentRef-"(idstring)":"]%s"AdditionRef-"(idstring)syntax. Thanks @weihanglo!
0.11.1 - 2025-08-11
- 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.
- 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 longer done, resolving #79.
0.11.0 - 2025-08-08
- 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.
- 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.
- 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 β β β β β β
0.10.9 - 2025-07-12
- PR#74 update SPDX license list to 3.27.0.
0.10.8 - 2024-12-31
- PR#74 update SPDX license list to 3.26.0.
0.10.7 - 2024-11-15
- PR#72 update SPDX license list to 3.25.0.
0.10.6 - 2024-05-31
- PR#70 update SPDX license list to 3.24.0.
0.10.4 - 2024-02-26
- PR#65 update SPDX license list to 3.23.
0.10.3 - 2024-01-04
- PR#63 update SPDX license list to 3.22.
- PR#64 resolved #56 by adding
Expression::canonicalizewhich fixes otherwise valid expressions into a form parsable withParseMode::STRICT
0.10.2 - 2023-07-14
- PR#61 updated the SPDX license list from
3.20=>3.21.
- PR#60 fixed a few typos.
0.10.1 - 2023-04-06
- PR#59 updated the SPDX license list from
3.19=>3.20.
0.10.0 - 2022-12-20
- PR#57 updated the SPDX license list from
3.18=>3.19.
0.9.0 - 2022-08-25
- PR#55 updated the SPDX license list from
3.14=>3.18.
0.8.1 - 2022-02-04
- PR#51 updates the crates.io metadata for the crate.
0.8.0 - 2021-12-21
- PR#50 changed
ParseModeto be a struct with several fields to give finer grained control over which parts of expression parsing/evaluation can be relaxed. Thanks @Turbo87!
0.7.0 - 2021-11-23
- 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#49 bumped the MSRV to 1.56.1, as well as moving to the 2021 edition and setting the
rust-versionthere.
0.6.2 - 2021-10-21
- PR#44 fixed the
Displayfor various GNU licenses, since they are "special" and diverge from the SPDX spec for reasons. Thanks @mmurto!
- 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.
0.6.1 - 2021-10-04
0.6.0 - 2021-08-16
- PR#40 updated the SPDX license list from
3.11=>3.14.
- PR#40 resolved #39 by taking the
GFDLexceptional differences from all other licenses (include the other GNU ones) into account.
0.5.0 - 2021-07-20
- 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 MSRV so changes are intentional.
- PR#38 replaced the unmaintained
differencecrate withsimilar-asserts.
0.4.1 - 2021-06-14
- 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 behavior changes. Thanks @Swagadon!
0.4.0 - 2021-03-26
- Renamed
LicenseItem::SPDX=>LicenseItem::SpdxandToken::SPDX=>Token::Spdx.
0.3.6 - 2021-02-12
- Updated to version 3.11 of the SPDX license list
0.3.5 - 2021-02-12
- Update smallvec to fix an advisory
0.3.4 - 2020-03-04
- Added
Expression::iter()which iterates over both the license requirements and the operators.
0.3.3 - 2020-02-29
- Updated to version 3.8 of the SPDX license list
0.3.2 - 2020-01-29
- PR#19 added the
#[non_exhaustive]attribute to the newParseModeenum, which bumped the minimum required Rust version to use this crate to 1.40. PR#21 removed this attribute as that enum is primarily an input for this crate, and had little benefit.
0.3.1 - 2020-01-28 (yanked)
- PR#19 Added
ParseModeenum, which has aLaxvariant that allows certain invalid license identifiers found in some crates on crates.io, as well as the invalid/expression separator. Thanks @kornel!
0.3.0 - 2019-12-14
- 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>
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
- 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
0.2.4 - 2019-11-25
- Impl Display for Licensee
0.2.3 - 2019-11-07
- Updated the list of licenses to version 3.7 of the SPDX license list
0.2.2 - 2019-11-06
- Added
LicenseId::full_namewhich is the full name for the license, eg "MIT License" for the "MIT" short identifier
0.2.1 - 2019-10-21
- #9 Added a flag for determining if a license is considered copyleft. Thanks @kain88-de!
0.2.0 - 2019-10-03
- 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"
- Uhm...everything. I hope no one was using 0.1.0.
- Use a better lexer, mostly copied from ehuss/license-exprs#29
0.1.0 - 2019-09-02
- Initial add of spdx crate, based primarily on
license-exprs