]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: zerocopy: update to v0.8.52
authorMiguel Ojeda <ojeda@kernel.org>
Thu, 25 Jun 2026 23:19:19 +0000 (01:19 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Sat, 11 Jul 2026 11:45:46 +0000 (13:45 +0200)
commit2808a3963988f00081594f1c4a2758733839eaac
treeba11c7daa157396d2d33315acb54a29fcb9bb3b7
parent4688cf884b3abcd12498e03b625d1916bf49a1e4
rust: zerocopy: update to v0.8.52

Update our vendored copy of `zerocopy` (and `zerocopy-derive`) to v0.8.52.

Most SPDX identifiers have been added upstream at our request [1]
(without parentheses -- supporting them is an issue on the kernel side,
but it does already reduce our differences). The CSS one for `rustdoc`
was added too [2], but will be picked up in a later version.

For `zerocopy`, enable `--cfg no_fp_fmt_parse`, which was added at our
request to avoid our local workaround [3]. This means one less difference,
thus indicate so in our `README.md`.

For `zerocopy-derive`, enable `--cfg zerocopy_unstable_linux`. This
allows us to use `#[derive(zerocopy_derive::most_traits)]`, a new feature
upstream added for us [4]. We noticed a minor doc render bug [5], which
will be fixed for a future version too.

The following script may be used to check for the remaining differences:

    for path in $(cd rust/zerocopy-derive/ && find . -type f ! -name README.md); do
        curl --silent --show-error --location \
            https://github.com/google/zerocopy/raw/v0.8.52/zerocopy/zerocopy-derive/src/$path |
            git diff --no-index - rust/zerocopy-derive/$path &&
            echo $path: OK
    done

    for path in $(cd rust/zerocopy/ && find . -type f ! -name README.md); do
        curl --silent --show-error --location \
            https://github.com/google/zerocopy/raw/v0.8.52/zerocopy/$path |
            git diff --no-index - rust/zerocopy/$path &&
            echo $path: OK
    done

Cc: Joshua Liebow-Feeser <joshlf@google.com>
Cc: Jack Wrenn <jswrenn@google.com>
Link: https://github.com/google/zerocopy/issues/3428
Link: https://github.com/google/zerocopy/issues/3457
Link: https://github.com/google/zerocopy/issues/3426
Link: https://github.com/google/zerocopy/pull/3416
Link: https://github.com/google/zerocopy/issues/3466
Acked-by: Nicolas Schier <n.schier@fritz.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260625231919.692444-1-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
31 files changed:
rust/Makefile
rust/zerocopy-derive/README.md
rust/zerocopy-derive/derive/from_bytes.rs
rust/zerocopy-derive/derive/into_bytes.rs
rust/zerocopy-derive/derive/known_layout.rs
rust/zerocopy-derive/derive/mod.rs
rust/zerocopy-derive/derive/try_from_bytes.rs
rust/zerocopy-derive/derive/unaligned.rs
rust/zerocopy-derive/lib.rs
rust/zerocopy-derive/repr.rs
rust/zerocopy-derive/util.rs
rust/zerocopy/README.md
rust/zerocopy/src/byte_slice.rs
rust/zerocopy/src/byteorder.rs
rust/zerocopy/src/deprecated.rs
rust/zerocopy/src/error.rs
rust/zerocopy/src/impls.rs
rust/zerocopy/src/layout.rs
rust/zerocopy/src/lib.rs
rust/zerocopy/src/macros.rs
rust/zerocopy/src/pointer/inner.rs
rust/zerocopy/src/pointer/invariant.rs
rust/zerocopy/src/pointer/mod.rs
rust/zerocopy/src/pointer/ptr.rs
rust/zerocopy/src/pointer/transmute.rs
rust/zerocopy/src/ref.rs
rust/zerocopy/src/split_at.rs
rust/zerocopy/src/util/macro_util.rs
rust/zerocopy/src/util/macros.rs
rust/zerocopy/src/util/mod.rs
rust/zerocopy/src/wrappers.rs