Skip to content

Add SPDX license field (MIT) to Cargo.toml#125

Merged
mxpv merged 1 commit into
mxpv:mainfrom
MarijnS95:add-mit-license-field
Jul 18, 2026
Merged

Add SPDX license field (MIT) to Cargo.toml#125
mxpv merged 1 commit into
mxpv:mainfrom
MarijnS95:add-mit-license-field

Conversation

@MarijnS95

@MarijnS95 MarijnS95 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Cargo.toml declares the license via license-file only. This adds the SPDX license = "MIT" field so tooling that reads the SPDX expression — crates.io metadata, license scanners, cargo-deny — picks it up directly.

Both fields are valid together and complementary: license gives the SPDX identifier, and license-file keeps the full MIT text with its required copyright line (Copyright (c) 2024 Maksym Pavlenko). No change to the LICENSE file.

crates.io even renders your license as non-standard because of this, and cargo-deny emits a no-license-field warning for openusd — which -D warnings promotes to a hard error. A [[licenses.clarify]] entry resolves the license expression (to MIT, from the LICENSE text) but does not opt out of that lint, so downstream consumers currently have to pass --allow no-license-field on the CLI. Adding the SPDX field removes the need for that workaround.

@MarijnS95 MarijnS95 changed the title Add SPDX license field (MIT) Add SPDX license field (MIT) to Cargo.toml Jul 17, 2026
@mxpv

mxpv commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Thanks!

@mxpv
mxpv merged commit 0d5d314 into mxpv:main Jul 18, 2026
5 checks passed
@MarijnS95
MarijnS95 deleted the add-mit-license-field branch July 18, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants