From: Nicolas Schier <nsc@kernel.org>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Tamir Duberstein" <tamird@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
rust-for-linux@vger.kernel.org,
"Jesung Yang" <y.j3ms.n@gmail.com>,
linux-kbuild@vger.kernel.org,
"Joshua Liebow-Feeser" <joshlf@google.com>,
"Jack Wrenn" <jswrenn@google.com>
Subject: Re: [PATCH] rust: zerocopy: update to v0.8.52
Date: Sat, 27 Jun 2026 09:55:12 +0200 [thread overview]
Message-ID: <aj-B4DLzEptpjeQ_@levanger> (raw)
In-Reply-To: <20260625231919.692444-1-ojeda@kernel.org>
On Fri, Jun 26, 2026 at 01:19:19AM +0200, Miguel Ojeda wrote:
> 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 [1]
> Link: https://github.com/google/zerocopy/issues/3457 [2]
> Link: https://github.com/google/zerocopy/issues/3426 [3]
> Link: https://github.com/google/zerocopy/pull/3416 [4]
> Link: https://github.com/google/zerocopy/issues/3466 [5]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
> rust/Makefile | 16 ++++--
> rust/zerocopy-derive/README.md | 14 +++---
> rust/zerocopy-derive/derive/from_bytes.rs | 2 +-
> rust/zerocopy-derive/derive/into_bytes.rs | 2 +-
> rust/zerocopy-derive/derive/known_layout.rs | 3 +-
> rust/zerocopy-derive/derive/mod.rs | 20 +++++---
> rust/zerocopy-derive/derive/try_from_bytes.rs | 6 +--
> rust/zerocopy-derive/derive/unaligned.rs | 2 +-
> rust/zerocopy-derive/lib.rs | 36 +++++++++++++-
> rust/zerocopy-derive/repr.rs | 2 +-
> rust/zerocopy-derive/util.rs | 34 ++++++++++---
> rust/zerocopy/README.md | 15 +++---
> rust/zerocopy/src/byte_slice.rs | 2 +-
> rust/zerocopy/src/byteorder.rs | 49 +++++++++++++++----
> rust/zerocopy/src/deprecated.rs | 2 +-
> rust/zerocopy/src/error.rs | 2 +-
> rust/zerocopy/src/impls.rs | 4 +-
> rust/zerocopy/src/layout.rs | 2 +-
> rust/zerocopy/src/lib.rs | 13 +++--
> rust/zerocopy/src/macros.rs | 2 +-
> rust/zerocopy/src/pointer/inner.rs | 2 +-
> rust/zerocopy/src/pointer/invariant.rs | 2 +-
> rust/zerocopy/src/pointer/mod.rs | 2 +-
> rust/zerocopy/src/pointer/ptr.rs | 2 +-
> rust/zerocopy/src/pointer/transmute.rs | 2 +-
> rust/zerocopy/src/ref.rs | 2 +-
> rust/zerocopy/src/split_at.rs | 2 +-
> rust/zerocopy/src/util/macro_util.rs | 2 +-
> rust/zerocopy/src/util/macros.rs | 2 +-
> rust/zerocopy/src/util/mod.rs | 2 +-
> rust/zerocopy/src/wrappers.rs | 2 +-
> 31 files changed, 174 insertions(+), 76 deletions(-)
>
> diff --git a/rust/Makefile b/rust/Makefile
> index a870d1616c71..835cf10e1c0b 100644
> --- a/rust/Makefile
> +++ b/rust/Makefile
> @@ -84,11 +84,15 @@ core-flags := \
> --edition=$(core-edition) \
> $(call cfgs-to-flags,$(core-cfgs))
>
> +zerocopy-cfgs := \
> + no_fp_fmt_parse
> +
> zerocopy-flags := \
> - --cap-lints=allow
> + --cap-lints=allow \
> + $(call cfgs-to-flags,$(zerocopy-cfgs))
>
> zerocopy-envs := \
> - CARGO_PKG_VERSION=0.8.50
> + CARGO_PKG_VERSION=0.8.52
>
> proc_macro2-cfgs := \
> feature="proc-macro" \
> @@ -128,11 +132,15 @@ syn-flags := \
> --extern quote \
> $(call cfgs-to-flags,$(syn-cfgs))
>
> +zerocopy_derive-cfgs := \
> + zerocopy_unstable_linux
> +
> zerocopy_derive-flags := \
> --cap-lints=allow \
> --extern proc_macro2 \
> --extern quote \
> - --extern syn
> + --extern syn \
> + $(call cfgs-to-flags,$(zerocopy_derive-cfgs))
>
> pin_init_internal-cfgs := \
> kernel USE_RUSTC_FEATURES
> @@ -644,9 +652,11 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L
> rust-analyzer:
> $(Q)MAKEFLAGS= $(srctree)/scripts/generate_rust_analyzer.py \
> --cfgs='core=$(core-cfgs)' $(core-edition) \
> + --cfgs='zerocopy=$(zerocopy-cfgs)' \
> --cfgs='proc_macro2=$(proc_macro2-cfgs)' \
> --cfgs='quote=$(quote-cfgs)' \
> --cfgs='syn=$(syn-cfgs)' \
> + --cfgs='zerocopy_derive=$(zerocopy_derive-cfgs)' \
> --cfgs='pin_init_internal=$(pin_init_internal-cfgs)' \
> --cfgs='pin_init=$(pin_init-cfgs)' \
> --envs='zerocopy=$(zerocopy-envs)' \
Thanks!
Acked-by: Nicolas Schier <n.schier@fritz.com>
prev parent reply other threads:[~2026-06-27 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 23:19 [PATCH] rust: zerocopy: update to v0.8.52 Miguel Ojeda
2026-06-27 7:55 ` Nicolas Schier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aj-B4DLzEptpjeQ_@levanger \
--to=nsc@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=joshlf@google.com \
--cc=jswrenn@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nathan@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
--cc=y.j3ms.n@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox