Skip to contentSkip to conversation

rust: zerocopy: fix link to upstream `README.md`

PATCH In review Miguel Ojeda 3 participants 4 messages Oct 13 – Oct 15 Rust

lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/2 rust: zerocopy: fix link to upstream `README.md`

Upstream moved the zerocopy crate into a zerocopy/ subdirectory of their repository in v0.8.51 [1]. However, in our v0.8.52 update, the link was not updated.

Fix it by adding the subdirectory.

Fixes 2808a3963988 ("rust: zerocopy: update to v0.8.52")
Assisted-by LLM
---
 rust/zerocopy-derive/README.md | 2 +-
 rust/zerocopy/README.md        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
rust/zerocopy-derive/README.md +1 -1
index d62c79804342..49de31b8e082 100644
@@ -8,7 +8,7 @@ non-ASCII identifiers.
 
 For copyright details, please see:
 
-    https://github.com/google/zerocopy/blob/v0.8.54/README.md?plain=1
+    https://github.com/google/zerocopy/blob/v0.8.54/zerocopy/README.md?plain=1
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-BSD
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-APACHE
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-MIT
rust/zerocopy/README.md +1 -1
index 3d11a6502cf0..8443f6166008 100644
@@ -7,7 +7,7 @@ modified to tweak the SPDX license identifiers.
 
 For copyright details, please see:
 
-    https://github.com/google/zerocopy/blob/v0.8.54/README.md?plain=1
+    https://github.com/google/zerocopy/blob/v0.8.54/zerocopy/README.md?plain=1
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-BSD
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-APACHE
     https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-MIT

base-commit: 3132a951a7e4ec2e18bc314877137deee96ab83e

Signature · 1 line
2.56.0
author maintainer
#1 lore raw

PATCH 2/2 rust: zerocopy: update to v0.8.62

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

This update advances 8 releases, with 3 of them carrying most of the changes. It contains new features as well as fixes [1]. However, almost nothing has changed that requires updates on our side: we only need to move our non-ASCII change to the recently added project.rs file, and to add an SPDX license identifier to the also new invariant.rs file (I reported it to upstream [2]).

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.62/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.62/zerocopy/$path |
            git diff --no-index - rust/zerocopy/$path &&
            echo $path: OK
    done

Comparing the output above with the one for the latest update (v0.8.54) shows no new differences on our side apart from the two mentioned above.

---
 rust/Makefile                                 |    2 +-
 rust/zerocopy-derive/README.md                |   12 +-
 rust/zerocopy-derive/derive/from_bytes.rs     |   12 +
 rust/zerocopy-derive/derive/into_bytes.rs     |  147 +-
 rust/zerocopy-derive/derive/known_layout.rs   |    4 +-
 rust/zerocopy-derive/derive/mod.rs            |   33 +-
 rust/zerocopy-derive/derive/project.rs        |  569 +++
 rust/zerocopy-derive/derive/try_from_bytes.rs |  869 ++--
 rust/zerocopy-derive/invariant.rs             |  116 +
 rust/zerocopy-derive/lib.rs                   |  118 +-
 rust/zerocopy-derive/repr.rs                  |   46 +-
 rust/zerocopy-derive/util.rs                  |  414 +-
 rust/zerocopy/README.md                       |   12 +-
 .../benches/as_bytes_dynamic_size.x86-64      |    3 +-
 .../benches/as_bytes_dynamic_size.x86-64.mca  |   20 +-
 .../zerocopy/benches/extend_vec_zeroed.x86-64 |    4 +-
 .../benches/extend_vec_zeroed.x86-64.mca      |    8 +-
 .../zerocopy/benches/insert_vec_zeroed.x86-64 |    4 +-
 .../benches/insert_vec_zeroed.x86-64.mca      |    8 +-
 rust/zerocopy/benches/new_vec_zeroed.x86-64   |    3 +-
 .../benches/new_vec_zeroed.x86-64.mca         |   46 +-
 .../ref_from_bytes_dynamic_padding.x86-64     |   31 +-
 .../ref_from_bytes_dynamic_padding.x86-64.mca |   70 +-
 .../ref_from_bytes_dynamic_size.x86-64        |   21 +-
 .../ref_from_bytes_dynamic_size.x86-64.mca    |   58 +-
 .../benches/ref_from_bytes_static_size.x86-64 |    7 +-
 .../ref_from_bytes_static_size.x86-64.mca     |   26 +-
 .../ref_from_prefix_dynamic_padding.x86-64    |   24 +-
 ...ref_from_prefix_dynamic_padding.x86-64.mca |   62 +-
 .../ref_from_prefix_dynamic_size.x86-64       |   21 +-
 .../ref_from_prefix_dynamic_size.x86-64.mca   |   52 +-
 .../ref_from_suffix_dynamic_padding.x86-64    |   29 +-
 ...ref_from_suffix_dynamic_padding.x86-64.mca |   68 +-
 ...m_suffix_with_elems_dynamic_padding.x86-64 |   36 +-
 ...ffix_with_elems_dynamic_padding.x86-64.mca |   84 +-
 ...from_suffix_with_elems_dynamic_size.x86-64 |   31 +-
 ..._suffix_with_elems_dynamic_size.x86-64.mca |   70 +-
 .../benches/ref_type_bytes_dynamic_padding.rs |   19 +
 .../ref_type_bytes_dynamic_padding.x86-64     |    4 +
 .../ref_type_bytes_dynamic_padding.x86-64.mca |   45 +
 .../benches/ref_type_bytes_dynamic_size.rs    |   17 +
 .../ref_type_bytes_dynamic_size.x86-64        |    4 +
 .../ref_type_bytes_dynamic_size.x86-64.mca    |   45 +
 .../ref_type_bytes_mut_dynamic_padding.rs     |   19 +
 .../ref_type_bytes_mut_dynamic_padding.x86-64 |    4 +
 ..._type_bytes_mut_dynamic_padding.x86-64.mca |   45 +
 .../ref_type_bytes_mut_dynamic_size.rs        |   19 +
 .../ref_type_bytes_mut_dynamic_size.x86-64    |    4 +
 ...ref_type_bytes_mut_dynamic_size.x86-64.mca |   45 +
 .../benches/ref_type_bytes_mut_static_size.rs |   19 +
 .../ref_type_bytes_mut_static_size.x86-64     |    4 +
 .../ref_type_bytes_mut_static_size.x86-64.mca |   45 +
 .../benches/ref_type_bytes_static_size.rs     |   17 +
 .../benches/ref_type_bytes_static_size.x86-64 |    4 +
 .../ref_type_bytes_static_size.x86-64.mca     |   45 +
 .../benches/ref_type_deref_dynamic_padding.rs |   19 +
 .../ref_type_deref_dynamic_padding.x86-64     |   29 +
 .../ref_type_deref_dynamic_padding.x86-64.mca |   91 +
 .../benches/ref_type_deref_dynamic_size.rs    |   19 +
 .../ref_type_deref_dynamic_size.x86-64        |   27 +
 .../ref_type_deref_dynamic_size.x86-64.mca    |   87 +
 .../ref_type_deref_mut_dynamic_size.rs        |   19 +
 .../ref_type_deref_mut_dynamic_size.x86-64    |   27 +
 ...ref_type_deref_mut_dynamic_size.x86-64.mca |   87 +
 .../benches/ref_type_deref_mut_static_size.rs |   19 +
 .../ref_type_deref_mut_static_size.x86-64     |    3 +
 .../ref_type_deref_mut_static_size.x86-64.mca |   43 +
 .../benches/ref_type_deref_static_size.rs     |   19 +
 .../benches/ref_type_deref_static_size.x86-64 |    3 +
 .../ref_type_deref_static_size.x86-64.mca     |   43 +
 .../ref_type_from_bytes_dynamic_padding.rs    |   19 +
 ...ref_type_from_bytes_dynamic_padding.x86-64 |   25 +
 ...type_from_bytes_dynamic_padding.x86-64.mca |   85 +
 .../ref_type_from_bytes_dynamic_size.rs       |   17 +
 .../ref_type_from_bytes_dynamic_size.x86-64   |   21 +
 ...ef_type_from_bytes_dynamic_size.x86-64.mca |   77 +
 .../ref_type_from_bytes_static_size.rs        |   17 +
 .../ref_type_from_bytes_static_size.x86-64    |   15 +
 ...ref_type_from_bytes_static_size.x86-64.mca |   65 +
 ...e_from_bytes_with_elems_dynamic_padding.rs |   20 +
 ...om_bytes_with_elems_dynamic_padding.x86-64 |   26 +
 ...ytes_with_elems_dynamic_padding.x86-64.mca |   85 +
 ...type_from_bytes_with_elems_dynamic_size.rs |   20 +
 ..._from_bytes_with_elems_dynamic_size.x86-64 |   28 +
 ...m_bytes_with_elems_dynamic_size.x86-64.mca |   89 +
 .../ref_type_from_prefix_dynamic_padding.rs   |   22 +
 ...ef_type_from_prefix_dynamic_padding.x86-64 |   26 +
 ...ype_from_prefix_dynamic_padding.x86-64.mca |   87 +
 .../ref_type_from_prefix_dynamic_size.rs      |   22 +
 .../ref_type_from_prefix_dynamic_size.x86-64  |   19 +
 ...f_type_from_prefix_dynamic_size.x86-64.mca |   73 +
 .../ref_type_from_prefix_static_size.rs       |   20 +
 .../ref_type_from_prefix_static_size.x86-64   |   15 +
 ...ef_type_from_prefix_static_size.x86-64.mca |   65 +
 ..._from_prefix_with_elems_dynamic_padding.rs |   23 +
 ...m_prefix_with_elems_dynamic_padding.x86-64 |   26 +
 ...efix_with_elems_dynamic_padding.x86-64.mca |   85 +
 ...ype_from_prefix_with_elems_dynamic_size.rs |   23 +
 ...from_prefix_with_elems_dynamic_size.x86-64 |   27 +
 ..._prefix_with_elems_dynamic_size.x86-64.mca |   87 +
 .../ref_type_from_suffix_dynamic_padding.rs   |   22 +
 ...ef_type_from_suffix_dynamic_padding.x86-64 |   31 +
 ...ype_from_suffix_dynamic_padding.x86-64.mca |   97 +
 .../ref_type_from_suffix_dynamic_size.rs      |   22 +
 .../ref_type_from_suffix_dynamic_size.x86-64  |   23 +
 ...f_type_from_suffix_dynamic_size.x86-64.mca |   81 +
 .../ref_type_from_suffix_static_size.rs       |   20 +
 .../ref_type_from_suffix_static_size.x86-64   |   18 +
 ...ef_type_from_suffix_static_size.x86-64.mca |   71 +
 ..._from_suffix_with_elems_dynamic_padding.rs |   23 +
 ...m_suffix_with_elems_dynamic_padding.x86-64 |   27 +
 ...ffix_with_elems_dynamic_padding.x86-64.mca |   87 +
 ...ype_from_suffix_with_elems_dynamic_size.rs |   23 +
 ...from_suffix_with_elems_dynamic_size.x86-64 |   27 +
 ..._suffix_with_elems_dynamic_size.x86-64.mca |   87 +
 .../benches/ref_type_into_mut_dynamic_size.rs |   19 +
 .../ref_type_into_mut_dynamic_size.x86-64     |   27 +
 .../ref_type_into_mut_dynamic_size.x86-64.mca |   87 +
 .../benches/ref_type_into_mut_static_size.rs  |   19 +
 .../ref_type_into_mut_static_size.x86-64      |    3 +
 .../ref_type_into_mut_static_size.x86-64.mca  |   43 +
 .../ref_type_into_ref_dynamic_padding.rs      |   19 +
 .../ref_type_into_ref_dynamic_padding.x86-64  |   29 +
 ...f_type_into_ref_dynamic_padding.x86-64.mca |   91 +
 .../benches/ref_type_into_ref_dynamic_size.rs |   19 +
 .../ref_type_into_ref_dynamic_size.x86-64     |   27 +
 .../ref_type_into_ref_dynamic_size.x86-64.mca |   87 +
 .../benches/ref_type_into_ref_static_size.rs  |   19 +
 .../ref_type_into_ref_static_size.x86-64      |    3 +
 .../ref_type_into_ref_static_size.x86-64.mca  |   43 +
 .../benches/ref_type_read_static_size.rs      |   17 +
 .../benches/ref_type_read_static_size.x86-64  |    7 +
 .../ref_type_read_static_size.x86-64.mca      |   51 +
 .../benches/ref_type_write_static_size.rs     |   20 +
 .../benches/ref_type_write_static_size.x86-64 |    6 +
 .../ref_type_write_static_size.x86-64.mca     |   49 +
 ...t_via_runtime_check_dynamic_padding.x86-64 |    5 +-
 ...a_runtime_check_dynamic_padding.x86-64.mca |   30 +-
 .../benches/try_read_from_bytes.x86-64        |   28 +-
 .../benches/try_read_from_bytes.x86-64.mca    |   66 +-
 .../benches/try_read_from_prefix.x86-64       |   19 +-
 .../benches/try_read_from_prefix.x86-64.mca   |   52 +-
 .../benches/try_read_from_suffix.x86-64       |   21 +-
 .../benches/try_read_from_suffix.x86-64.mca   |   56 +-
 .../try_ref_from_bytes_dynamic_padding.x86-64 |   34 +-
 ..._ref_from_bytes_dynamic_padding.x86-64.mca |   76 +-
 .../try_ref_from_bytes_dynamic_size.x86-64    |   31 +-
 ...try_ref_from_bytes_dynamic_size.x86-64.mca |   70 +-
 ...try_ref_from_prefix_dynamic_padding.x86-64 |   21 +-
 ...ref_from_prefix_dynamic_padding.x86-64.mca |   54 +-
 .../try_ref_from_prefix_dynamic_size.x86-64   |   16 +-
 ...ry_ref_from_prefix_dynamic_size.x86-64.mca |   56 +-
 ...try_ref_from_suffix_dynamic_padding.x86-64 |   29 +-
 ...ref_from_suffix_dynamic_padding.x86-64.mca |   74 +-
 ...m_suffix_with_elems_dynamic_padding.x86-64 |   31 +-
 ...ffix_with_elems_dynamic_padding.x86-64.mca |   80 +-
 ...from_suffix_with_elems_dynamic_size.x86-64 |   28 +-
 ..._suffix_with_elems_dynamic_size.x86-64.mca |   72 +-
 .../benches/write_to_dynamic_size.x86-64      |    3 +-
 .../benches/write_to_dynamic_size.x86-64.mca  |   34 +-
 .../write_to_prefix_dynamic_size.x86-64       |    3 +-
 .../write_to_prefix_dynamic_size.x86-64.mca   |   36 +-
 .../write_to_suffix_dynamic_size.x86-64       |    3 +-
 .../write_to_suffix_dynamic_size.x86-64.mca   |   38 +-
 .../zerocopy/benches/zero_dynamic_size.x86-64 |    3 +-
 .../benches/zero_dynamic_size.x86-64.mca      |   20 +-
 rust/zerocopy/src/byte_slice.rs               |    6 +-
 rust/zerocopy/src/byteorder.rs                |   41 +-
 rust/zerocopy/src/error.rs                    |   14 +-
 rust/zerocopy/src/impls.rs                    |  117 +-
 rust/zerocopy/src/layout.rs                   | 3729 +++++++++++++++--
 rust/zerocopy/src/lib.rs                      | 1081 ++++-
 rust/zerocopy/src/macros.rs                   |   53 +-
 rust/zerocopy/src/pointer/inner.rs            |   35 +-
 rust/zerocopy/src/pointer/invariant.rs        |   61 +-
 rust/zerocopy/src/pointer/mod.rs              |   50 +-
 rust/zerocopy/src/pointer/ptr.rs              |  177 +-
 rust/zerocopy/src/pointer/transmute.rs        |  100 +-
 rust/zerocopy/src/ref.rs                      |  762 +++-
 rust/zerocopy/src/split_at.rs                 |  718 +++-
 rust/zerocopy/src/util/macro_util.rs          |  112 +-
 rust/zerocopy/src/util/macros.rs              |  127 +-
 rust/zerocopy/src/util/mod.rs                 |   40 +-
 rust/zerocopy/src/wrappers.rs                 |  262 +-
 184 files changed, 12220 insertions(+), 3006 deletions(-)
 create mode 100644 rust/zerocopy-derive/derive/project.rs
 create mode 100644 rust/zerocopy-derive/invariant.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_mut_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_bytes_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_deref_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_deref_mut_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_deref_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_deref_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_deref_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_into_mut_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.rs
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_dynamic_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_into_ref_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_read_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_read_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_read_static_size.x86-64.mca
 create mode 100644 rust/zerocopy/benches/ref_type_write_static_size.rs
 create mode 100644 rust/zerocopy/benches/ref_type_write_static_size.x86-64
 create mode 100644 rust/zerocopy/benches/ref_type_write_static_size.x86-64.mca
rust/Makefile +1 -1
index ddca144cb084..0ac9ab28cc2b 100644
@@ -94,7 +94,7 @@ zerocopy-flags := \
     $(call cfgs-to-flags,$(zerocopy-cfgs))
 
 zerocopy-envs := \
-    CARGO_PKG_VERSION=0.8.54
+    CARGO_PKG_VERSION=0.8.62
 
 proc_macro2-cfgs := \
     feature="proc-macro" \
rust/zerocopy-derive/README.md +6 -6
index 49de31b8e082..fab3779b9ed2 100644
@@ -1,14 +1,14 @@
 # `zerocopy-derive`
 
-These source files come from the Rust `zerocopy-derive` crate, version v0.8.54
-(released 2026-07-08), hosted in the <https://github.com/google/zerocopy>
+These source files come from the Rust `zerocopy-derive` crate, version v0.8.62
+(released 2026-10-08), hosted in the <https://github.com/google/zerocopy>
 repository, licensed under "BSD-2-Clause OR Apache-2.0 OR MIT" and only
 modified to tweak the SPDX license identifiers and to remove the generation of
 non-ASCII identifiers.
 
 For copyright details, please see:
 
-    https://github.com/google/zerocopy/blob/v0.8.54/zerocopy/README.md?plain=1
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-BSD
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-APACHE
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-MIT
+    https://github.com/google/zerocopy/blob/v0.8.62/zerocopy/README.md?plain=1
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-BSD
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-APACHE
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-MIT
rust/zerocopy-derive/derive/from_bytes.rs +12 -0
index 66d820f6ad4c..7fe505a86457 100644
@@ -89,6 +89,12 @@ pub(crate) fn find_zero_variant(enm: &DataEnum) -> Result<usize, bool> {
     Err(has_unknown_discriminants)
 }
 pub(crate) fn derive_from_zeros(ctx: &Ctx, top_level: Trait) -> Result<TokenStream, Error> {
+    if let Some(span) = ctx.invariant_span {
+        return ctx.error_or_skip(Error::new(
+            span,
+            "cannot derive `FromZeros` for a type with invariants",
+        ));
+    }
     let try_from_bytes = derive_try_from_bytes(ctx, top_level)?;
     let from_zeros = match &ctx.ast.data {
         Data::Struct(strct) => derive_from_zeros_struct(ctx, strct),
@@ -98,6 +104,12 @@ pub(crate) fn derive_from_zeros(ctx: &Ctx, top_level: Trait) -> Result<TokenStre
     Ok(IntoIterator::into_iter([try_from_bytes, from_zeros]).collect())
 }
 pub(crate) fn derive_from_bytes(ctx: &Ctx, top_level: Trait) -> Result<TokenStream, Error> {
+    if let Some(span) = ctx.invariant_span {
+        return ctx.error_or_skip(Error::new(
+            span,
+            "cannot derive `FromBytes` for a type with invariants",
+        ));
+    }
     let from_zeros = derive_from_zeros(ctx, top_level)?;
     let from_bytes = match &ctx.ast.data {
         Data::Struct(strct) => derive_from_bytes_struct(ctx, strct),
rust/zerocopy-derive/derive/into_bytes.rs +139 -8

199 lines not on this page · raw message

rust/zerocopy-derive/derive/known_layout.rs +3 -1
index d0c4cecfff15..d4f6ecff5730 100644
@@ -81,7 +81,7 @@ fn raw_from_ptr_len(
 
             #[inline(always)]
             fn pointer_to_metadata(ptr: *mut Self) -> <Self as #zerocopy_crate::KnownLayout>::PointerMetadata {
-                <#trailing_field_ty>::pointer_to_metadata(ptr as *mut _)
+                <#trailing_field_ty as #zerocopy_crate::KnownLayout>::pointer_to_metadata(ptr as *mut _)
             }
         }
     };
@@ -144,6 +144,7 @@ fn pointer_to_metadata(ptr: *mut Self) -> <Self as #zerocopy_crate::KnownLayout>
         // Define the collection of type-level field handles.
         let field_defs = field_indices.iter().zip(fields).map(|(idx, (vis, _, _))| {
             quote! {
+                #[allow(missing_debug_implementations)]
                 #vis struct #idx;
             }
         });
@@ -200,6 +201,7 @@ unsafe impl #impl_generics #zerocopy_crate::util::macro_util::Field<#idx> for #i
             // `#ty`, not `__ZerocopyKnownLayoutMaybeUninit` (see #2116).
             #repr
             #[doc(hidden)]
+            #[allow(missing_debug_implementations)]
             #vis struct __ZerocopyKnownLayoutMaybeUninit<#params> (
                 #(#core::mem::MaybeUninit<
                     <#ident #ty_generics as
rust/zerocopy-derive/derive/mod.rs +21 -12
index b3839fcf73c9..4ccb71807ee7 100644
@@ -3,6 +3,7 @@
 pub mod from_bytes;
 pub mod into_bytes;
 pub mod known_layout;
+pub mod project;
 pub mod try_from_bytes;
 pub mod unaligned;
 
@@ -102,13 +103,6 @@ pub(crate) fn derive_split_at(ctx: &Ctx, _top_level: Trait) -> Result<TokenStrea
         }
     };
 
-    if repr.get_packed().is_some() {
-        return ctx.error_or_skip(Error::new(
-            Span::call_site(),
-            "must not have #[repr(packed)] attribute",
-        ));
-    }
-
     if !(repr.is_c() || repr.is_transparent()) {
         return ctx.error_or_skip(Error::new(
             Span::call_site(),
@@ -124,13 +118,28 @@ pub(crate) fn derive_split_at(ctx: &Ctx, _top_level: Trait) -> Result<TokenStrea
     };
 
     let zerocopy_crate = &ctx.zerocopy_crate;
-    // SAFETY: `#ty`, per the above checks, is `repr(C)` or `repr(transparent)`
-    // and is not packed; its trailing field is guaranteed to be well-aligned
-    // for its type. By invariant on `FieldBounds::TRAILING_SELF`, the trailing
-    // slice of the trailing field is also well-aligned for its type.
+    let elem = quote!(<#trailing_field as #zerocopy_crate::SplitAt>::Elem);
+    let elem =
+        if repr.get_packed().is_some() { quote!(#zerocopy_crate::Unalign<#elem>) } else { elem };
+
+    // SAFETY: The checks above require `repr(C)` or `repr(transparent)`, and
+    // `FieldBounds::TRAILING_SELF` requires the trailing field to be `SplitAt`.
+    // Its `Elem` therefore has the size, bit validity, and `UnsafeCell`
+    // coverage of the actual trailing element. For an unpacked struct, the
+    // trailing field is aligned, so its `SplitAt` alignment guarantee applies.
+    // For a packed struct, wrapping its `Elem` in `Unalign` preserves those
+    // representation properties and gives alignment 1. Thus the trailing
+    // slice can be accessed as `[#elem]` even if packing misaligns its field.
+    // Packing does not change the field's internal layout [1], so its element
+    // size and byte offsets are preserved in either case.
+    //
+    // [1] Per https://doc.rust-lang.org/1.93.0/reference/type-layout.html#layout.repr.alignment.intro:
+    //
+    //   `packed` may also alter the padding between fields (although it will
+    //   not alter the padding inside of any field).
     Ok(ImplBlockBuilder::new(ctx, &ctx.ast.data, Trait::SplitAt, FieldBounds::TRAILING_SELF)
         .inner_extras(quote! {
-            type Elem = <#trailing_field as #zerocopy_crate::SplitAt>::Elem;
+            type Elem = #elem;
         })
         .build())
 }
rust/zerocopy-derive/derive/project.rs new file +569 -0

569 lines not on this page · raw message

rust/zerocopy-derive/derive/try_from_bytes.rs +279 -590

995 lines not on this page · raw message

rust/zerocopy-derive/invariant.rs new file +116 -0

116 lines not on this page · raw message

rust/zerocopy-derive/lib.rs +109 -9

161 lines not on this page · raw message

rust/zerocopy-derive/repr.rs +43 -3

86 lines not on this page · raw message

rust/zerocopy-derive/util.rs +369 -45

557 lines not on this page · raw message

rust/zerocopy/README.md +6 -6
index 8443f6166008..5cdea261e45f 100644
@@ -1,13 +1,13 @@
 # `zerocopy`
 
-These source files come from the Rust `zerocopy` crate, version v0.8.54
-(released 2026-07-08), hosted in the <https://github.com/google/zerocopy>
+These source files come from the Rust `zerocopy` crate, version v0.8.62
+(released 2026-10-08), hosted in the <https://github.com/google/zerocopy>
 repository, licensed under "BSD-2-Clause OR Apache-2.0 OR MIT" and only
 modified to tweak the SPDX license identifiers.
 
 For copyright details, please see:
 
-    https://github.com/google/zerocopy/blob/v0.8.54/zerocopy/README.md?plain=1
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-BSD
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-APACHE
-    https://github.com/google/zerocopy/blob/v0.8.54/LICENSE-MIT
+    https://github.com/google/zerocopy/blob/v0.8.62/zerocopy/README.md?plain=1
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-BSD
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-APACHE
+    https://github.com/google/zerocopy/blob/v0.8.62/LICENSE-MIT
rust/zerocopy/benches/as_bytes_dynamic_size.x86-64 +1 -2
index f68bad612695..12ab2e3c4b37 100644
@@ -1,5 +1,4 @@
 bench_as_bytes_dynamic_size:
 	mov rax, rdi
-	lea rdx, [2*rsi + 5]
-	and rdx, -2
+	lea rdx, [2*rsi + 4]
 	ret
rust/zerocopy/benches/as_bytes_dynamic_size.x86-64.mca +9 -11
index c3b92a9a95fe..d661f093fea6 100644
@@ -1,11 +1,11 @@
 Iterations:        100
-Instructions:      400
-Total Cycles:      137
-Total uOps:        400
+Instructions:      300
+Total Cycles:      104
+Total uOps:        300
 
 Dispatch Width:    4
-uOps Per Cycle:    2.92
-IPC:               2.92
+uOps Per Cycle:    2.88
+IPC:               2.88
 Block RThroughput: 1.0
 
 
@@ -19,8 +19,7 @@ Instruction Info:
 
 [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
  1      1     0.33                        mov	rax, rdi
- 1      1     0.50                        lea	rdx, [2*rsi + 5]
- 1      1     0.33                        and	rdx, -2
+ 1      1     0.50                        lea	rdx, [2*rsi + 4]
  1      1     1.00                  U     ret
 
 
@@ -37,11 +36,10 @@ Resources:
 
 Resource pressure per iteration:
 [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  
- -      -     1.33   1.33    -     1.34    -      -     
+ -      -     0.99   1.00    -     1.01    -      -     
 
 Resource pressure by instruction:
 [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  Instructions:
- -      -      -     0.66    -     0.34    -      -     mov	rax, rdi
- -      -     0.33   0.67    -      -      -      -     lea	rdx, [2*rsi + 5]
- -      -     1.00    -      -      -      -      -     and	rdx, -2
+ -      -     0.99    -      -     0.01    -      -     mov	rax, rdi
+ -      -      -     1.00    -      -      -      -     lea	rdx, [2*rsi + 4]
  -      -      -      -      -     1.00    -      -     ret
rust/zerocopy/benches/extend_vec_zeroed.x86-64 +2 -2
index 831b2a075fec..0790ce20273d 100644
@@ -41,8 +41,8 @@ bench_extend_vec_zeroed:
 .LBB6_6:
 	mov r13, rsi
 	lea rcx, [rax + rax]
-	cmp r15, rcx
-	cmova rcx, r15
+	cmp rcx, r15
+	cmovbe rcx, r15
 	cmp rcx, 5
 	mov r14d, 4
 	cmovae r14, rcx
rust/zerocopy/benches/extend_vec_zeroed.x86-64.mca +4 -4
index cfab1eea8f56..cf3c5a5ad5e3 100644
@@ -55,8 +55,8 @@ Instruction Info:
  1      1     1.00                  U     ret
  1      1     0.33                        mov	r13, rsi
  1      1     0.50                        lea	rcx, [rax + rax]
- 1      1     0.33                        cmp	r15, rcx
- 3      3     1.00                        cmova	rcx, r15
+ 1      1     0.33                        cmp	rcx, r15
+ 3      3     1.00                        cmovbe	rcx, r15
  1      1     0.33                        cmp	rcx, 5
  1      1     0.33                        mov	r14d, 4
  2      2     0.67                        cmovae	r14, rcx
@@ -128,8 +128,8 @@ Resource pressure by instruction:
  -      -      -      -      -     1.00    -      -     ret
  -      -     1.00    -      -      -      -      -     mov	r13, rsi
  -      -     0.01   0.99    -      -      -      -     lea	rcx, [rax + rax]
- -      -     0.99   0.01    -      -      -      -     cmp	r15, rcx
- -      -     2.00   0.01    -     0.99    -      -     cmova	rcx, r15
+ -      -     0.99   0.01    -      -      -      -     cmp	rcx, r15
+ -      -     2.00   0.01    -     0.99    -      -     cmovbe	rcx, r15
  -      -     0.01   0.99    -      -      -      -     cmp	rcx, 5
  -      -     0.01   0.99    -      -      -      -     mov	r14d, 4
  -      -     1.00   0.01    -     0.99    -      -     cmovae	r14, rcx
rust/zerocopy/benches/insert_vec_zeroed.x86-64 +2 -2
index 9db87403cb55..b5426c3f4a3e 100644
@@ -54,8 +54,8 @@ bench_insert_vec_zeroed:
 	mov r15, rsi
 	mov rbp, rdx
 	lea rcx, [rax + rax]
-	cmp r12, rcx
-	cmova rcx, r12
+	cmp rcx, r12
+	cmovbe rcx, r12
 	cmp rcx, 5
 	mov r14d, 4
 	cmovae r14, rcx
rust/zerocopy/benches/insert_vec_zeroed.x86-64.mca +4 -4
index 665240667844..a6c17e236823 100644
@@ -68,8 +68,8 @@ Instruction Info:
  1      1     0.33                        mov	r15, rsi
  1      1     0.33                        mov	rbp, rdx
  1      1     0.50                        lea	rcx, [rax + rax]
- 1      1     0.33                        cmp	r12, rcx
- 3      3     1.00                        cmova	rcx, r12
+ 1      1     0.33                        cmp	rcx, r12
+ 3      3     1.00                        cmovbe	rcx, r12
  1      1     0.33                        cmp	rcx, 5
  1      1     0.33                        mov	r14d, 4
  2      2     0.67                        cmovae	r14, rcx
@@ -159,8 +159,8 @@ Resource pressure by instruction:
  -      -     0.49   0.51    -      -      -      -     mov	r15, rsi
  -      -     0.51   0.49    -      -      -      -     mov	rbp, rdx
  -      -     0.49   0.51    -      -      -      -     lea	rcx, [rax + rax]
- -      -     0.49   0.50    -     0.01    -      -     cmp	r12, rcx
- -      -     1.04   0.50    -     1.46    -      -     cmova	rcx, r12
+ -      -     0.49   0.50    -     0.01    -      -     cmp	rcx, r12
+ -      -     1.04   0.50    -     1.46    -      -     cmovbe	rcx, r12
  -      -     0.49   0.49    -     0.02    -      -     cmp	rcx, 5
  -      -     0.50    -      -     0.50    -      -     mov	r14d, 4
  -      -     0.50   0.51    -     0.99    -      -     cmovae	r14, rcx
rust/zerocopy/benches/new_vec_zeroed.x86-64 +1 -2
index b5c083aa0d36..edf421e3192c 100644
@@ -29,8 +29,7 @@ bench_new_vec_zeroed:
 	mov qword ptr [rax + 16], rsi
 	ret
 .LBB5_5:
-	movabs rcx, -9223372036854775808
-	mov qword ptr [rax], rcx
+	mov qword ptr [rax], -1
 	ret
 .LBB5_2:
 	mov ecx, 2
rust/zerocopy/benches/new_vec_zeroed.x86-64.mca +22 -24

57 lines not on this page · raw message

rust/zerocopy/benches/ref_from_bytes_dynamic_padding.x86-64 +15 -16
index e844a4608fac..7f695f942e67 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_bytes_dynamic_padding.x86-64.mca +35 -35

70 lines not on this page · raw message

rust/zerocopy/benches/ref_from_bytes_dynamic_size.x86-64 +6 -15
index cc905b76c06f..43cadf352783 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_bytes_dynamic_size.x86-64.mca +21 -37

58 lines not on this page · raw message

rust/zerocopy/benches/ref_from_bytes_static_size.x86-64 +3 -4
index 2c8da68c8b5b..0e16b103344f 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_bytes_static_size.x86-64.mca +12 -14
index 832697801ee2..f1e118abf09a 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_prefix_dynamic_padding.x86-64 +12 -12
index a58592a24503..e7f7820a69d1 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_prefix_dynamic_padding.x86-64.mca +32 -30

62 lines not on this page · raw message

rust/zerocopy/benches/ref_from_prefix_dynamic_size.x86-64 +7 -14
index fe6332c9100c..3f2e87467897 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_prefix_dynamic_size.x86-64.mca +21 -31

52 lines not on this page · raw message

rust/zerocopy/benches/ref_from_suffix_dynamic_padding.x86-64 +14 -15
index 3e05f6023f38..68f21fe8018a 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_suffix_dynamic_padding.x86-64.mca +34 -34

68 lines not on this page · raw message

rust/zerocopy/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 +15 -21
index c3d10b5fc685..7d11849dd5c5 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca +37 -47

84 lines not on this page · raw message

rust/zerocopy/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 +13 -18
index bdca57192455..7ee0278dbf68 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca +31 -39

70 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_dynamic_padding.rs new file +19 -0
new file mode 100644
index 000000000000..8d4e26394596

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_dynamic_padding.x86-64 new file +4 -0
new file mode 100644
index 000000000000..a44c1510fe02

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_dynamic_padding.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_dynamic_size.rs new file +17 -0
new file mode 100644
index 000000000000..ef7dcf83989d

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_dynamic_size.x86-64 new file +4 -0
new file mode 100644
index 000000000000..6ac3ad2f1fef

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_dynamic_size.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.rs new file +19 -0
new file mode 100644
index 000000000000..e99b6704bd9b

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.x86-64 new file +4 -0
new file mode 100644
index 000000000000..ebc6ee04941e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_padding.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.rs new file +19 -0
new file mode 100644
index 000000000000..badf9de19f06

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.x86-64 new file +4 -0
new file mode 100644
index 000000000000..5d97d01e51e2

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_dynamic_size.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_mut_static_size.rs new file +19 -0
new file mode 100644
index 000000000000..1a49c2492a41

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_static_size.x86-64 new file +4 -0
new file mode 100644
index 000000000000..3411bd45e96a

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_mut_static_size.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_bytes_static_size.rs new file +17 -0
new file mode 100644
index 000000000000..b9c3fe5b7bb5

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_static_size.x86-64 new file +4 -0
new file mode 100644
index 000000000000..10a024acaafd

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_bytes_static_size.x86-64.mca new file +45 -0

45 lines not on this page · raw message

rust/zerocopy/benches/ref_type_deref_dynamic_padding.rs new file +19 -0
new file mode 100644
index 000000000000..c0ebe56ccc75

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_dynamic_padding.x86-64 new file +29 -0
new file mode 100644
index 000000000000..765c5305d86d

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_dynamic_padding.x86-64.mca new file +91 -0

91 lines not on this page · raw message

rust/zerocopy/benches/ref_type_deref_dynamic_size.rs new file +19 -0
new file mode 100644
index 000000000000..adcf89c22508

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..60ca3b508a7e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.rs new file +19 -0
new file mode 100644
index 000000000000..263f2c575379

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..5ae0ae69efad

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_mut_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_deref_mut_static_size.rs new file +19 -0
new file mode 100644
index 000000000000..4f85a031c845

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_mut_static_size.x86-64 new file +3 -0
new file mode 100644
index 000000000000..259c39646bb3

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_mut_static_size.x86-64.mca new file +43 -0

43 lines not on this page · raw message

rust/zerocopy/benches/ref_type_deref_static_size.rs new file +19 -0
new file mode 100644
index 000000000000..60397dc28580

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_static_size.x86-64 new file +3 -0
new file mode 100644
index 000000000000..2d4368dd61df

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_deref_static_size.x86-64.mca new file +43 -0

43 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.rs new file +19 -0
new file mode 100644
index 000000000000..d11cae87a1df

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.x86-64 new file +25 -0
new file mode 100644
index 000000000000..9f2beef51011

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_dynamic_padding.x86-64.mca new file +85 -0

85 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.rs new file +17 -0
new file mode 100644
index 000000000000..cf0b278eaf09

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.x86-64 new file +21 -0
new file mode 100644
index 000000000000..c50dfc333bd6

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_dynamic_size.x86-64.mca new file +77 -0

77 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_bytes_static_size.rs new file +17 -0
new file mode 100644
index 000000000000..6a2ced8aad89

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_static_size.x86-64 new file +15 -0
new file mode 100644
index 000000000000..59c3862eb569

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_static_size.x86-64.mca new file +65 -0

65 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.rs new file +20 -0
new file mode 100644
index 000000000000..5d3ee937c2b3

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.x86-64 new file +26 -0
new file mode 100644
index 000000000000..0eb8287a145e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_padding.x86-64.mca new file +85 -0

85 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.rs new file +20 -0
new file mode 100644
index 000000000000..0ea631ab0c48

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.x86-64 new file +28 -0
new file mode 100644
index 000000000000..67cc5b58dd14

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_bytes_with_elems_dynamic_size.x86-64.mca new file +89 -0

89 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.rs new file +22 -0
new file mode 100644
index 000000000000..7826991fc546

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.x86-64 new file +26 -0
new file mode 100644
index 000000000000..a549e3337985

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_dynamic_padding.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.rs new file +22 -0
new file mode 100644
index 000000000000..131a12103656

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.x86-64 new file +19 -0
new file mode 100644
index 000000000000..fc050aac2637

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_dynamic_size.x86-64.mca new file +73 -0

73 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_prefix_static_size.rs new file +20 -0
new file mode 100644
index 000000000000..c149fd5088ee

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_static_size.x86-64 new file +15 -0
new file mode 100644
index 000000000000..420fd6f3b4bd

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_static_size.x86-64.mca new file +65 -0

65 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.rs new file +23 -0
new file mode 100644
index 000000000000..a4fe5a6c86ca

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.x86-64 new file +26 -0
new file mode 100644
index 000000000000..fb9d6bfaac27

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_padding.x86-64.mca new file +85 -0

85 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.rs new file +23 -0
new file mode 100644
index 000000000000..b0911e8fd8e7

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..20ba73bd552e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_prefix_with_elems_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.rs new file +22 -0
new file mode 100644
index 000000000000..894b7d875b42

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.x86-64 new file +31 -0
new file mode 100644
index 000000000000..4a0f5e88612e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_dynamic_padding.x86-64.mca new file +97 -0

97 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.rs new file +22 -0
new file mode 100644
index 000000000000..2cdadc3316d6

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.x86-64 new file +23 -0
new file mode 100644
index 000000000000..9dc329867dde

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_dynamic_size.x86-64.mca new file +81 -0

81 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_suffix_static_size.rs new file +20 -0
new file mode 100644
index 000000000000..2ad2d2f5ee33

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_static_size.x86-64 new file +18 -0
new file mode 100644
index 000000000000..37a3d72e7ca1

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_static_size.x86-64.mca new file +71 -0

71 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.rs new file +23 -0
new file mode 100644
index 000000000000..105086dd4dc9

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.x86-64 new file +27 -0
new file mode 100644
index 000000000000..a52ec2c34dd9

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_padding.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.rs new file +23 -0
new file mode 100644
index 000000000000..926f3044b4bf

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..a6c84ec32242

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_from_suffix_with_elems_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_into_mut_dynamic_size.rs new file +19 -0
new file mode 100644
index 000000000000..04ac859a98a8

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_mut_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..b7568f6631ce

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_mut_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_into_mut_static_size.rs new file +19 -0
new file mode 100644
index 000000000000..edab9abe0aa8

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_mut_static_size.x86-64 new file +3 -0
new file mode 100644
index 000000000000..0412b33d6cc3

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_mut_static_size.x86-64.mca new file +43 -0

43 lines not on this page · raw message

rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.rs new file +19 -0
new file mode 100644
index 000000000000..9f5f3b618c2f

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.x86-64 new file +29 -0
new file mode 100644
index 000000000000..ca16dbc03e8e

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_dynamic_padding.x86-64.mca new file +91 -0

91 lines not on this page · raw message

rust/zerocopy/benches/ref_type_into_ref_dynamic_size.rs new file +19 -0
new file mode 100644
index 000000000000..535c67985200

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_dynamic_size.x86-64 new file +27 -0
new file mode 100644
index 000000000000..81624de69046

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_dynamic_size.x86-64.mca new file +87 -0

87 lines not on this page · raw message

rust/zerocopy/benches/ref_type_into_ref_static_size.rs new file +19 -0
new file mode 100644
index 000000000000..a2bdf559a903

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_static_size.x86-64 new file +3 -0
new file mode 100644
index 000000000000..173562c46561

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_into_ref_static_size.x86-64.mca new file +43 -0

43 lines not on this page · raw message

rust/zerocopy/benches/ref_type_read_static_size.rs new file +17 -0
new file mode 100644
index 000000000000..da7111261b80

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_read_static_size.x86-64 new file +7 -0
new file mode 100644
index 000000000000..c5ebb527f419

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_read_static_size.x86-64.mca new file +51 -0

51 lines not on this page · raw message

rust/zerocopy/benches/ref_type_write_static_size.rs new file +20 -0
new file mode 100644
index 000000000000..6537cc4609e9

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_write_static_size.x86-64 new file +6 -0
new file mode 100644
index 000000000000..1b919d01409a

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/ref_type_write_static_size.x86-64.mca new file +49 -0

49 lines not on this page · raw message

rust/zerocopy/benches/split_via_runtime_check_dynamic_padding.x86-64 +2 -3
index 03684cb09f8f..0a8a4f501a07 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/split_via_runtime_check_dynamic_padding.x86-64.mca +14 -16
index 5034ab0583bd..7140b06e8842 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_read_from_bytes.x86-64 +8 -20
index 08088a08fd85..2135facc2655 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_read_from_bytes.x86-64.mca +22 -44

66 lines not on this page · raw message

rust/zerocopy/benches/try_read_from_prefix.x86-64 +7 -12
index d3e1edc3ea73..0f820efff5f8 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_read_from_prefix.x86-64.mca +21 -31

52 lines not on this page · raw message

rust/zerocopy/benches/try_read_from_suffix.x86-64 +7 -14
index 095e326f0467..a91c074e1806 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_read_from_suffix.x86-64.mca +21 -35

56 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_bytes_dynamic_padding.x86-64 +16 -18
index 217c5fc61796..5584e9054185 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca +37 -39

76 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_bytes_dynamic_size.x86-64 +15 -16
index cf67afd31ce0..39b12e14eec1 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_bytes_dynamic_size.x86-64.mca +34 -36

70 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_prefix_dynamic_padding.x86-64 +10 -11
index d832cb7ecf7f..ff64bb659591 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca +27 -27

54 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_prefix_dynamic_size.x86-64 +8 -8
index be7f34b9f8f5..de31f571f3c9 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_prefix_dynamic_size.x86-64.mca +29 -27

56 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_suffix_dynamic_padding.x86-64 +13 -16
index b3e924442865..cee9a3179097 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca +35 -39

74 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 +11 -20
index c7530d8b6815..ca483dee63ba 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca +32 -48

80 lines not on this page · raw message

rust/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 +10 -18
index 952eb12de8d6..748eb1166e13 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca +29 -43

72 lines not on this page · raw message

rust/zerocopy/benches/write_to_dynamic_size.x86-64 +1 -2
index c5abb17f7eba..714b68c51734 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/write_to_dynamic_size.x86-64.mca +16 -18
index 5b2c08a31a29..2cc0a58c70fc 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/write_to_prefix_dynamic_size.x86-64 +1 -2
index d7779c6c9178..63e5d5200962 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/write_to_prefix_dynamic_size.x86-64.mca +17 -19
index 4cebe24d4f3b..e623ab3f302c 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/write_to_suffix_dynamic_size.x86-64 +1 -2
index 75f349562db6..d13a9bb3b83c 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/write_to_suffix_dynamic_size.x86-64.mca +18 -20
index 95cb9dfe2eb7..fb8fce317e0c 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/zero_dynamic_size.x86-64 +1 -2
index 2b31ed644eaf..92e2748b1353 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/benches/zero_dynamic_size.x86-64.mca +9 -11
index 0b086a29b0ed..7dee3b1de141 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/src/byte_slice.rs +5 -1
index b7f85098dbc4..26fcc088aecf 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/src/byteorder.rs +36 -5

41 lines not on this page · raw message

rust/zerocopy/src/error.rs +6 -8
index 5eb30de934f3..98399bab7e97 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/src/impls.rs +59 -58

117 lines not on this page · raw message

rust/zerocopy/src/layout.rs +3344 -385

3,729 lines not on this page · raw message

rust/zerocopy/src/lib.rs +885 -196

1,081 lines not on this page · raw message

rust/zerocopy/src/macros.rs +49 -4

53 lines not on this page · raw message

rust/zerocopy/src/pointer/inner.rs +16 -19
index 949b60a3f83e..8beb6267b217 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/src/pointer/invariant.rs +36 -25

61 lines not on this page · raw message

rust/zerocopy/src/pointer/mod.rs +24 -26

50 lines not on this page · raw message

rust/zerocopy/src/pointer/ptr.rs +115 -62

177 lines not on this page · raw message

rust/zerocopy/src/pointer/transmute.rs +54 -46

100 lines not on this page · raw message

rust/zerocopy/src/ref.rs +651 -111

762 lines not on this page · raw message

rust/zerocopy/src/split_at.rs +551 -167

718 lines not on this page · raw message

rust/zerocopy/src/util/macro_util.rs +81 -31

112 lines not on this page · raw message

rust/zerocopy/src/util/macros.rs +66 -61

127 lines not on this page · raw message

rust/zerocopy/src/util/mod.rs +9 -31
index 02fd4ed62741..646f45739802 100644

Lines of this file are not shown. View the raw message.

rust/zerocopy/src/wrappers.rs +223 -39

262 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.56.0

Part of the diff is not shown here. View the raw message.

reviewer Reviewed-by on v1 1/2
#2 lore raw
In reply to Miguel Ojeda
Quoted 10 lines · Miguel Ojeda

Upstream moved the zerocopy crate into a zerocopy/ subdirectory of their repository in v0.8.51 [1]. However, in our v0.8.52 update, the link was not updated.

Fix it by adding the subdirectory.

Fixes 2808a3963988 ("rust: zerocopy: update to v0.8.52")
Assisted-by LLM

For both patches:

#3 lore raw
In reply to Miguel Ojeda
Quoted 11 lines · Miguel Ojeda

Upstream moved the zerocopy crate into a zerocopy/ subdirectory of their repository in v0.8.51 [1]. However, in our v0.8.52 update, the link was not updated.

Fix it by adding the subdirectory.

Fixes 2808a3963988 ("rust: zerocopy: update to v0.8.52")
Assisted-by LLM

Applied (both) to rust-next -- thanks everyone!

As mentioned yesterday in the call, I fixed Jack's Cc address and Josh already fixed upstream my SPDX report for .63, so that is fine. Upstream even has now an SPDX check so that we don't hit it again, which is nice, thanks! :)

By the way, we also discussed a concern after the call regarding the size of the updates -- it is indeed a bit scary to see the number of lines changed, even if the actual commits on our side are mostly mechanical, and even if many of those changed lines are for things we don't actually use in practice (e.g. Kani, Miri, tests, benches, new gated features, etc.). I still think we should still take regularly these bumps, since they contain fixes, and since we don't want to get too behind upstream anyway given the support they are giving us, but I thought I would mention it.

We also discussed what will happen when the kernel may want to move to syn 3 in the medium-term -- it could be nice to talk about it in one of the next calls.

Cheers,
Miguel