Context: For our incoming use of zerocopy and zerocopy-derive in the Linux kernel, I only needed a couple small patches to adapt the crates. It would be nice (but they are not blockers at the moment) if we could have these upstream to simplify upgrades later on.
This is a trivial one, and we can definitely handle it on our side at upgrade time, but for completeness: we also add SPDX license identifiers at the top of every file. These one line comments could be added to upstream zerocopy which could help codebases that vendor zerocopy and at the same time care about SPDX tagging.
A couple notes, though:
- I didn't add them in our vendored copy on
benches/ because those files get embedded. But I did so for src/ as well as the rustdoc stylesheet.
- The current Linux kernel SPDX checking script does not like chained
OR conditions, so I had to add parentheses in one of them. I am not sure yet if there is a particular reason for that in the script, but for upstream zerocopy it probably makes sense to match Cargo.toml's license field.
Please see https://lore.kernel.org/rust-for-linux/20260602172920.30342-10-ojeda@kernel.org/ and https://lore.kernel.org/rust-for-linux/20260602172920.30342-15-ojeda@kernel.org/ for the Linux kernel patches that add the lines on our side.
Context: For our incoming use of
zerocopyandzerocopy-derivein the Linux kernel, I only needed a couple small patches to adapt the crates. It would be nice (but they are not blockers at the moment) if we could have these upstream to simplify upgrades later on.This is a trivial one, and we can definitely handle it on our side at upgrade time, but for completeness: we also add SPDX license identifiers at the top of every file. These one line comments could be added to upstream
zerocopywhich could help codebases that vendorzerocopyand at the same time care about SPDX tagging.A couple notes, though:
benches/because those files get embedded. But I did so forsrc/as well as therustdocstylesheet.ORconditions, so I had to add parentheses in one of them. I am not sure yet if there is a particular reason for that in the script, but for upstreamzerocopyit probably makes sense to matchCargo.toml'slicensefield.Please see https://lore.kernel.org/rust-for-linux/20260602172920.30342-10-ojeda@kernel.org/ and https://lore.kernel.org/rust-for-linux/20260602172920.30342-15-ojeda@kernel.org/ for the Linux kernel patches that add the lines on our side.