Skip to content

Commit

Permalink
Improve FromBytes documentation and release 0.7.27
Browse files Browse the repository at this point in the history
This PR adds examples to most methods of `FromBytes`, and
separately documents `derive(FromBytes)`. Theoretical soundness
requirements are placed with trait documentation, and the details
of the derive's analysis is placed in the derive documentation.

This PR follows the pattern of #505.

Makes progress towards #32.
  • Loading branch information
jswrenn committed Nov 30, 2023
1 parent 40202e4 commit 6958627
Show file tree
Hide file tree
Showing 3 changed files with 598 additions and 55 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[package]
edition = "2018"
name = "zerocopy"
version = "0.7.26"
version = "0.7.27"
authors = ["Joshua Liebow-Feeser <[email protected]>"]
description = "Utilities for zero-copy parsing and serialization"
license = "BSD-2-Clause OR Apache-2.0 OR MIT"
Expand Down Expand Up @@ -49,7 +49,7 @@ simd-nightly = ["simd"]
__internal_use_only_features_that_work_on_stable = ["alloc", "derive", "simd"]

[dependencies]
zerocopy-derive = { version = "=0.7.26", path = "zerocopy-derive", optional = true }
zerocopy-derive = { version = "=0.7.27", path = "zerocopy-derive", optional = true }

[dependencies.byteorder]
version = "1.3"
Expand All @@ -60,7 +60,7 @@ optional = true
# zerocopy-derive remain equal, even if the 'derive' feature isn't used.
# See: https://github.com/matklad/macro-dep-test
[target.'cfg(any())'.dependencies]
zerocopy-derive = { version = "=0.7.26", path = "zerocopy-derive" }
zerocopy-derive = { version = "=0.7.27", path = "zerocopy-derive" }

[dev-dependencies]
assert_matches = "1.5"
Expand All @@ -75,6 +75,6 @@ testutil = { path = "testutil" }
# CI test failures.
trybuild = { version = "=1.0.85", features = ["diff"] }
# In tests, unlike in production, zerocopy-derive is not optional
zerocopy-derive = { version = "=0.7.26", path = "zerocopy-derive" }
zerocopy-derive = { version = "=0.7.27", path = "zerocopy-derive" }
# TODO(#381) Remove this dependency once we have our own layout gadgets.
elain = "0.3.0"
Loading

0 comments on commit 6958627

Please sign in to comment.