-
Notifications
You must be signed in to change notification settings - Fork 124
Comparing changes
Open a pull request
base repository: google/zerocopy
base: v0.8.23
head repository: google/zerocopy
compare: v0.8.24
- 20 commits
- 51 files changed
- 4 contributors
Commits on Mar 6, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 52f65db - Browse repository at this point
Copy the full SHA 52f65dbView commit details -
[pointer] Support generic
TransmuteFrom
framework (#2408)This commit removes the `TransparentWrapper` trait and the `Ptr::transparent_wrapper_into_inner` method. It replaces them with a new family of transmutation traits which encode more generic transmutation (from any `T` to any `U`) and a set of `Ptr` methods which use those traits to bound transmutation operations. In particular: - `Dst: TransmuteFrom<Src>` denotes that a by-value transmutation is sound - `Dst: TryTransmuteFromPtr<Src>` denotes that a transmutation is sound so long as it can be guaranteed that the source is bit-valid for the destination; this is used by e.g. `Ptr::try_into_valid`, which performs runtime validation of bit validity - `Dst: TransmuteFromPtr<Src>` is equivalent to `TransmuteFrom<Src> + TryTransmuteFromPtr<Src>` Some type arguments are omitted in this summary. In particular, all three traits also take validity invariant parameters for both the source and destination types. Also, the `[Try]TransmuteFromPtr` traits take an aliasing parameter. In order to support these traits, we introduce a generalization of `Read` known as `MutationCompatible`. `T: MutationCompatible<U, A>` denotes that *either* `T: Read<A>` and `U: Read<A>` *or* `T` and `U` have the same interior mutation semantics (formally, it is sound for `&T` and `&U` to reference the same referent - safe code operating on these references cannot cause undefined behavior). This is a refinement of the "`UnsafeCell` agreement" concept that we have used before, but it supports types which store but don't actually use `UnsafeCell`s. For example, given a hypothetical `ReadOnly<T>`, the following bound holds: usize: MutationCompatible<ReadOnly<AtomicUsize>, Exclusive> This commit also takes a different approach from the one originally envisioned in #1945. In particular, it turns out that we don't need a full type-level mapping concept. Instead, we need a *predicate* over transitions to determine which ones are valid (e.g., it is valid to go from a `Valid` `MaybeUninit<T>` to an `Uninit` `MaybeUninit<T>`). By contrast, the invariant mapping concept suggests that each source validity has *exactly one* destination validity. This commit makes progress on #1940 by supporting unsized transmutations, but we don't yet support size shrinking or expanding transmutations. This commit obsoletes #1359, as that issue was predicated upon the existence of `TransparentWrapper`, which this commit removes. This commit closes #1226, which suggests supporting `UnsafeCell` agreement. Closes #1945 Closes #1359 Closes #2226 Closes #1226 Closes #1866 Makes progress on #1359 gherrit-pr-id: Iad14813bc6d933312bc8d7a1ddcf1aafc7126938 Co-authored-by: Jack Wrenn <jswrenn@amazon.com>
Configuration menu - View commit details
-
Copy full SHA for ee12c01 - Browse repository at this point
Copy the full SHA ee12c01View commit details
Commits on Mar 7, 2025
-
Implement FromZeros for AtomicPtr (#2426)
Makes progress on #1009 gherrit-pr-id: I3d825b6c6b99277c96d9fd6a6761bdfad2000473
Configuration menu - View commit details
-
Copy full SHA for 5ad3b3f - Browse repository at this point
Copy the full SHA 5ad3b3fView commit details
Commits on Mar 8, 2025
-
[pointer] SizeEq supports raw pointer transmutes (#2427)
This permits us to remove the `KnownLayout` bounds from `Ptr::transmute`, and thus to remove `Ptr::transmute_sized` entirely. This also allows us to remove the hand-rolled impl of `TryFromBytes` for `ManuallyDrop<T>`, replacing it with an invocation of `impl_for_transmute_from!`. gherrit-pr-id: I090715fd9ed6f100fd35513b05054015621ecb9c
Configuration menu - View commit details
-
Copy full SHA for d735ecf - Browse repository at this point
Copy the full SHA d735ecfView commit details -
Implement traits for Cell (#2421)
Closes #1253 gherrit-pr-id: I569b74086a5f98cda71b4a4131f9ce4f89dcc623
Configuration menu - View commit details
-
Copy full SHA for c2dd89e - Browse repository at this point
Copy the full SHA c2dd89eView commit details -
Remove obsolete safety proofs (#2423)
* Implement traits for Cell Closes #1253 gherrit-pr-id: I569b74086a5f98cda71b4a4131f9ce4f89dcc623 * Remove obsolete safety proofs In #2408, we simplified the safety precondition of `unsafe_impl!`, but did not remove safety proofs at call sites made redundant by that simplification. This commit removes those now-obsolete proofs. gherrit-pr-id: I70d5aa5ace6bd2e39e679eac7f00a66d4b843d57
Configuration menu - View commit details
-
Copy full SHA for 04cafb2 - Browse repository at this point
Copy the full SHA 04cafb2View commit details
Commits on Mar 11, 2025
-
[layout] Move Kani proofs from crate root (#2430)
All moved proofs test code from the `layout` module, and so belong there rather than in the crate root. gherrit-pr-id: I691b42ce8c0c3c6e5990e7684fc66f8f5dd73d85
Configuration menu - View commit details
-
Copy full SHA for 2bfd906 - Browse repository at this point
Copy the full SHA 2bfd906View commit details
Commits on Mar 18, 2025
-
[git] Ignore VSCode workspace files (#2443)
gherrit-pr-id: I90b578eda7942bd1cf206c08801f5855a0ef30a0
Configuration menu - View commit details
-
Copy full SHA for 17e39b2 - Browse repository at this point
Copy the full SHA 17e39b2View commit details -
[ci] Include doctests in coverage (#2446)
gherrit-pr-id: I046abe912435c8944ace21c207334b002efa9ea7
Configuration menu - View commit details
-
Copy full SHA for 8e2fe2c - Browse repository at this point
Copy the full SHA 8e2fe2cView commit details -
[ci] Roll pinned nightly toolchain (#2442)
We remove `simd-nightly` impls for the `arm` target `[u]int8x4_t` types, which are now just type aliases for `u32` and `i32`. We also switch from using `wasm32-wasi` to `wasm32-unknown-unknown` in CI, as the former is less supported (and not available via `rustup` on this particular nightly). gherrit-pr-id: I0a19a7789334f41ffedc55b871df9736d4b51484
Configuration menu - View commit details
-
Copy full SHA for d769fb9 - Browse repository at this point
Copy the full SHA d769fb9View commit details -
[ci] Check (but don't test) avr-none target (#2448)
Closes #2400 gherrit-pr-id: I69f30d9256afe91a6cf7619bec2b37b57ce98880
Configuration menu - View commit details
-
Copy full SHA for ff4a607 - Browse repository at this point
Copy the full SHA ff4a607View commit details -
[kani] Use function contracts instead of proofs (#2449)
gherrit-pr-id: I681bacc2fbc00531c8493490b9f982fa4aea307a
Configuration menu - View commit details
-
Copy full SHA for 855c237 - Browse repository at this point
Copy the full SHA 855c237View commit details -
[byte_slice] Add Kani proofs (#2451)
gherrit-pr-id: Ide939969b8d0c3bc117aa9f1dba06e6d570f262f
Configuration menu - View commit details
-
Copy full SHA for 8aa96d3 - Browse repository at this point
Copy the full SHA 8aa96d3View commit details
Commits on Mar 19, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 7abd7be - Browse repository at this point
Copy the full SHA 7abd7beView commit details -
[ptr] Simplify PtrInner's invariants (#2450)
gherrit-pr-id: I855bc98cf1674d02e3750e2fc55810be79795796
Configuration menu - View commit details
-
Copy full SHA for 31cfbd7 - Browse repository at this point
Copy the full SHA 31cfbd7View commit details -
[transmute] Update TryTransmuteFromPtr proof (#2455)
This language was made stale by the recent change to `PtrInner`'s invariants. gherrit-pr-id: I9e6ee4b276bf7a6ccec7b8cfbb44afd61dd36dfa
Configuration menu - View commit details
-
Copy full SHA for 09cda40 - Browse repository at this point
Copy the full SHA 09cda40View commit details -
[derive] Replace impl_block with builder pattern (#2456)
This allows us to simplify a number of call sites which don't make use of every parameter that `impl_block` previously accepted. gherrit-pr-id: If2c6733f78dbc90d34812985a8c39ebaddb211fe
Configuration menu - View commit details
-
Copy full SHA for ed32df4 - Browse repository at this point
Copy the full SHA ed32df4View commit details
Commits on Mar 20, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 1a82be7 - Browse repository at this point
Copy the full SHA 1a82be7View commit details
Commits on Mar 21, 2025
-
[derive] Support #[zerocopy(crate = "...")] attribute (#2452)
Read the `#[zerocopy(crate = "...")]` attribute (if present), and use the provided path in the derive output when referencing items exported from zerocopy. If the attribute isn't present, then `::zerocopy` will be used.
Configuration menu - View commit details
-
Copy full SHA for 5056899 - Browse repository at this point
Copy the full SHA 5056899View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99329a9 - Browse repository at this point
Copy the full SHA 99329a9View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.8.23...v0.8.24