Skip to content

feat: the licence text of every crate travels inside the app - #49

Merged
rgdevment merged 2 commits into
mainfrom
feat/licence-texts
Oct 4, 2026
Merged

rgdevment merged 2 commits into
mainfrom
feat/licence-texts

Conversation

@rgdevment

@rgdevment rgdevment commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

THIRD-PARTY-BUNDLED.md names each crate and its licence, but MIT, Apache, BSD, ISC, BSL, Zlib, Unicode and MPL ask for the text itself to travel with the copy.

  • npm run notices also writes THIRD-PARTY-LICENSES.md: for every linked crate, its root licence files, NOTICE, LICENSES/ (where Slint keeps its own) and license_file, CRLF normalised and deduplicated by sha256. 234 texts for 367 crates, 708 KB.

  • 36 crates ship no file. They get the text of the licence they declare: Apache-2.0 when offered, SPDX's BSL-1.0 and MPL-2.0 from scripts/licences/, MIT, BSD-3 or ISC with the manifest's authors. The generator refuses to write if any crate is left without a text.

  • The binary includes the file. About opens it under a second button, Licence texts, with the same viewer, one shelf open at a time. The notices command takes licences: bool, so lib.rs stays under its ceiling.

  • The notices check in rules.yml and the release compare both files, and a PR touching scripts/licences/ or the new file triggers the check.

  • Three About tests (asked only when opened, gives way to the notices, a failure is said); markdown.test.ts requires every link in both real files to be absolute

  • Two runs give the same sha256; ordering does not depend on the locale

  • vitest 167/167, tsc, lint, fmt, clippy -D warnings, rules.sh, markdownlint

  • Open Licence texts in a built copy and check that 708 KB renders smoothly

THIRD-PARTY-BUNDLED.md names each crate and its licence, but MIT, Apache,
BSD, ISC, BSL, Zlib, Unicode and MPL ask for the text itself to go with the
copy. npm run notices now also writes THIRD-PARTY-LICENSES.md: the licence
files each linked crate ships, LICENSES/ and NOTICE included, each text once
under the crates that carry it, 234 texts for 367 crates.

A crate that ships no file gets the text of the licence it declares: Apache
when offered, SPDX's BSL-1.0 and MPL-2.0 from scripts/licences, and MIT,
BSD-3 or ISC with the manifest's authors. The generator refuses to write if
any crate is left without one, and two runs give the same bytes.

The binary includes the file, and About opens it under a second button with
the same viewer; the notices command takes which file to hand back, so lib.rs
stays under its ceiling. The notices check and the release compare both
files.
…the notices

Picking one licence out of "(MIT OR Apache-2.0) AND Unicode-3.0" would have
written the MIT text alone and dropped the one the AND requires. Such a crate
now joins the ones with no text, and the generator refuses to write.
@rgdevment
rgdevment merged commit 666eb06 into main Oct 4, 2026
22 checks passed
@rgdevment
rgdevment deleted the feat/licence-texts branch October 4, 2026 23:44
@rgdevment rgdevment mentioned this pull request Oct 5, 2026
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.

1 participant