commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
84585908ac1bb87bbda7eed1418cf442ed6e1bd1 | Andrew Gallant | 2018-07-28T14:08:10 | globset-0.4.1 | diff --git a/Cargo.lock b/Cargo.lock
index acc66b8..566b0b1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -103,7 +103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "globset"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"aho-corasick 0.6.6 (registry+https://githu... | 2 | 4 | 4 |
4dd2f8e40e38158d48d5be054e9110446caa5f9e | Andrew Gallant | 2018-07-22T17:07:48 | deps: update atty and winapi
This updates atty and winapi to their latest versions, including the bug
fix in atty that allows it to work with winapi 0.3.5. | diff --git a/Cargo.lock b/Cargo.lock
index a1b681a..acc66b8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,17 +11,17 @@ name = "ansi_term"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ ... | 2 | 17 | 17 |
0d11497d2133f1973321ae383e139a9f1a71500f | Andrew Gallant | 2018-07-22T15:08:16 | tests: be looser with gzip failure
Don't expect the exact error message. Instead, just ask that the error
message exist and be non-empty.
Fixes #903 | diff --git a/tests/tests.rs b/tests/tests.rs
index 9b6154d..8a38f54 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -1869,7 +1869,7 @@ fn compressed_failing_gzip() {
let output = cmd.output().unwrap();
let err = String::from_utf8_lossy(&output.stderr);
- assert_eq!(err.contains("not in gzip format"),... | 1 | 1 | 1 |
7a44cad599d7602ccd4395136c14587c159a37a3 | Andrew Gallant | 2018-07-22T13:31:22 | deps: pin winapi to 0.3.4
winapi 0.3.5 changed how it represents some of its structs, which caused
a bug to surface in atty that prevents tty detection on Windows. atty
has an open PR to fix this: https://github.com/softprops/atty/pull/28
Until a new release of atty, we pin winapi to a version that works. | diff --git a/Cargo.lock b/Cargo.lock
index 2b47012..a1b681a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,7 @@ name = "ansi_term"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "w... | 1 | 12 | 12 |
6dc09c5b1b7da5de65b5a5df3ce570f05d82e3a3 | Andrew Gallant | 2018-07-22T00:56:45 | ripgrep: add --no-pre switch
This switch explicitly disables the --pre behavior. An empty string will
also disable --pre behavior, but actually utterring an empty flag value
is quite awkward, so we provide an explicit switch to do the same thing.
Thanks to @c-blake for pointing this out. | diff --git a/src/app.rs b/src/app.rs
index 10e524b..4336d5a 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1460,8 +1460,7 @@ This flag can be disabled with --no-search-zip.
let arg = RGArg::switch("no-search-zip")
.hidden()
- .overrides("search-zip")
- .overrides("pre");
+ .overrides(... | 1 | 10 | 6 |
209a125ea25615e8fa605c844f8cbcca8c672208 | Andrew Gallant | 2018-07-22T00:36:32 | ripgrep: replace decoder with encoding_rs_io
This commit mostly moves the transcoder implementation to its own
crate: https://github.com/BurntSushi/encoding_rs_io
The new crate adds clear documentation and cleans up the implementation
to fully implement the contract of io::Read. | diff --git a/Cargo.lock b/Cargo.lock
index 7aa50c3..2b47012 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -69,6 +69,14 @@ dependencies = [
"simd 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
+[[package]]
+name = "encoding_rs_io"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/... | 5 | 18 | 460 |
090216cf002a579c987df76125fcdcb97478d48e | Andrew Gallant | 2018-07-21T21:53:55 | ripgrep: reformat --pre warning | diff --git a/src/app.rs b/src/app.rs
index 6344f53..10e524b 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1473,9 +1473,10 @@ contents of FILE. This option expects the COMMAND program to either be an
absolute path or to be available in your PATH. An empty string COMMAND
deactivates this feature.
-WARNING: When this f... | 1 | 4 | 3 |
c96a3585935f8fb064fd40828447ba862f86ff5b | Andrew Gallant | 2018-07-21T21:50:54 | ripgrep: add warning to --pre flag
The --pre flag can result in a pretty large performance penalty, so put
a warning in the flag documentation. This warning is important because a
flag like this could easily wind up in a user's configuration file. | diff --git a/src/app.rs b/src/app.rs
index 67b7295..6344f53 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1473,6 +1473,10 @@ contents of FILE. This option expects the COMMAND program to either be an
absolute path or to be available in your PATH. An empty string COMMAND
deactivates this feature.
+WARNING: When this f... | 1 | 4 | 0 |
aa2ce39d14e4493c2389ef0bc9f65597cb8b120c | phiresky | 2018-07-21T17:26:54 | ignore: fix has_any_ignore_rules for explicit ignores
When building a ignore::WalkBuilder by disabling all standard filters
and adding a custom global ignore file, the ignore file is not used. Example:
let mut walker = ignore::WalkBuilder::new(dir);
walker.standard_filters(false);
walker.add_ignore(m... | diff --git a/ignore/src/dir.rs b/ignore/src/dir.rs
index 2e1b82e..3e98f6f 100644
--- a/ignore/src/dir.rs
+++ b/ignore/src/dir.rs
@@ -266,9 +266,11 @@ impl Ignore {
fn has_any_ignore_rules(&self) -> bool {
let opts = self.0.opts;
let has_custom_ignore_files = !self.0.custom_ignore_filenames.is_emp... | 2 | 20 | 0 |
d11a3b33773620bcc593f82b557757f0c2ec8a05 | Andrew Gallant | 2018-07-21T17:25:39 | crates.io: use 'OR' instead of '/'
Fixes #987 | diff --git a/Cargo.toml b/Cargo.toml
index 4526864..c9b02d4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ repository = "https://github.com/BurntSushi/ripgrep"
readme = "README.md"
keywords = ["regex", "grep", "egrep", "search", "pattern"]
categories = ["command-line-utilities", "text-processing"]
-licen... | 1 | 1 | 1 |
d09e2f6af1821c4d6fcdcfb7278e57c76c1f5c76 | Andrew Gallant | 2018-07-21T17:23:46 | globset: clarify documentation on regex method
This makes it clear that the `bytes` API of the regex crate should be
used instead of the Unicode API.
Fixes #985 | diff --git a/globset/src/glob.rs b/globset/src/glob.rs
index 062f5a6..cbbc7ba 100644
--- a/globset/src/glob.rs
+++ b/globset/src/glob.rs
@@ -275,6 +275,19 @@ impl Glob {
}
/// Returns the regular expression string for this glob.
+ ///
+ /// Note that regular expressions for globs are intended to be ma... | 1 | 13 | 0 |
7b6af5a177b90bc5002395577a6eb35f8c8b8931 | Andrew Gallant | 2018-07-18T13:29:04 | deps: update regex to 1.0.2
And also update to regex-syntax 0.6.2. | diff --git a/Cargo.lock b/Cargo.lock
index 468f1d2..7aa50c3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -102,7 +102,7 @@ dependencies = [
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"memchr 2.0.1 (registry+https://gith... | 1 | 10 | 10 |
1393ce4b6bea306ffcca5999ebe070b134a51d5e | Andrew Gallant | 2018-07-18T00:34:03 | deps: update all transitive dependencies
This updates all remaining transitive dependencies. Most changes appear
minor and there appear to be no minimum Rust version conflicts. Yay! | diff --git a/Cargo.lock b/Cargo.lock
index a95cf15..468f1d2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
[[package]]
name = "aho-corasick"
-version = "0.6.4"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.0.1 (registry+https://github.com/... | 1 | 38 | 38 |
8e358ee056c78f88009b0348bdd350743774989e | Andrew Gallant | 2018-07-18T00:32:49 | deps: bump various dependencies
Nothing major here. All patch releases. This should bring us completely
up to date with all direct dependencies. | diff --git a/Cargo.lock b/Cargo.lock
index 1322b8a..a95cf15 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -19,7 +19,7 @@ name = "atty"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.... | 2 | 21 | 21 |
5b5f4e74d92484d3a521ecd0171e9af80be888b2 | Andrew Gallant | 2018-07-18T00:29:41 | deps: bump encoding_rs to 0.8
This brings in performance improvements. | diff --git a/Cargo.lock b/Cargo.lock
index ee09e4d..1322b8a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -62,7 +62,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "encoding_rs"
-version = "0.7.2"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-in... | 2 | 4 | 4 |
7e5a59027638952ae55a1cc3d9d3b2ce7d69be98 | Andrew Gallant | 2018-07-18T00:23:31 | grep: small literal detection fix
This commit tweaks the inner literal detection heuristic such that if it
comes up with any literal that is all whitespace, then it's likely a bad
literal to look for since it's so common. Therefore, we simply reject the
inner literal optimization in this case and let the regex engine ... | diff --git a/grep/src/literals.rs b/grep/src/literals.rs
index 3e1c385..5e3dc8e 100644
--- a/grep/src/literals.rs
+++ b/grep/src/literals.rs
@@ -67,6 +67,16 @@ impl LiteralSets {
lit = req;
}
+ // Special case: if we have any literals that are all whitespace,
+ // then this is prob... | 1 | 10 | 0 |
d17ca45063c53c188c207fe5825c36d885513560 | Andrew Gallant | 2018-07-17T22:37:02 | deps: update termcolor to 1.0.0 | diff --git a/Cargo.lock b/Cargo.lock
index df657d0..ee09e4d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -245,7 +245,7 @@ dependencies = [
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"same-file 1.0.2 (registry+http... | 2 | 10 | 6 |
164cedda0eae131bc6cb67902599f4ec253642ca | lokathor | 2026-01-31T04:58:59 | chore: Release bytemuck version 1.25.0 | diff --git a/Cargo.toml b/Cargo.toml
index 1cde154..23d0bb3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.24.0"
+version = "1.25.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
7009d79870508b50dff8166255761dae5ddcb6ae | Lukasz Anforowicz | 2026-01-31T04:53:26 | Fix `nightly_portable_simd` after `LaneCount` removal. (#344)
https://github.com/rust-lang/rust/commit/0eaef592336f0c12cd9648c989f360308d842d2d
(which included https://github.com/rust-lang/portable-simd/pull/485)
was merged on 2026-01-27 and removed `core::simd::LaneCount`. This
`bytemuck` commit ensures that `nightl... | diff --git a/Cargo.toml b/Cargo.toml
index ca3f6a0..1cde154 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -97,7 +97,7 @@ latest_stable_rust = [
# ALL FEATURES BELOW THIS ARE NOT SEMVER SUPPORTED! TEMPORARY ONLY!
# Enable support for `std::simd` types.
-nightly_portable_simd = []
+nightly_portable_simd = ["rustversion... | 3 | 28 | 1 |
58c62034e9059a2cab5cfb40d45cc45acd3a4d5c | Jeremy Fitzhardinge | 2026-01-16T16:33:47 | Make derive(NoUninit) have the same constraints as Pod (#341)
Derive is allowed for generic types if they are `repr(transparent)` or
`packed(1)`.
Co-authored-by: Jeremy Fitzhardinge <jsgf@meta.com> | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index de1ce51..6d79097 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -66,20 +66,20 @@ impl Derivable for Pod {
) -> Result<TokenStream> {
let repr = get_repr(&input.attrs)?;
- let completly_packed =
+ let packed_or_transparent =
... | 3 | 61 | 9 |
e4bce3b32c33888c99d1fb1b5ff66f2a03a92f56 | Soroush Mirzaei | 2025-12-15T20:50:39 | docs: fix typo (#337) | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index 684d1e1..93ea061 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -15,7 +15,7 @@ use crate::traits::{
/// Derive the `Pod` trait for a struct
///
-/// The macro ensures that the struct follows all the the safety requirements
+/// The macro ensures th... | 2 | 9 | 9 |
92d78d2689ea60cd758fbdecd28cb9e50b4dd5f4 | zachs18 | 2025-11-07T04:14:14 | Remove `extern "stdcall"` fn ptr impls on non-x86-32 windows. (#333) | diff --git a/src/zeroable_in_option.rs b/src/zeroable_in_option.rs
index f5c5eb0..fe8afe7 100644
--- a/src/zeroable_in_option.rs
+++ b/src/zeroable_in_option.rs
@@ -52,9 +52,9 @@ macro_rules! impl_for_fn {
unsafe impl<$($ArgTy,)* R> ZeroableInOption for unsafe extern "C" fn($($ArgTy,)*) -> R {}
unsafe... | 1 | 2 | 2 |
da748163ea203f80098b6bdc754c54ebc535364c | Lokathor | 2025-10-03T19:09:52 | chore: Release bytemuck version 1.24.0 | diff --git a/Cargo.toml b/Cargo.toml
index d3276a1..f631851 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.23.2"
+version = "1.24.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
f40b0e482b78307cb966b3203fb15e149a9f2f15 | Lokathor | 2025-10-03T19:04:54 | update dep version to latest. | diff --git a/Cargo.toml b/Cargo.toml
index 04c95a1..d3276a1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -107,7 +107,7 @@ nightly_float = []
nightly_docs = []
[dependencies]
-bytemuck_derive = { version = "1.10.1", path = "derive", optional = true }
+bytemuck_derive = { version = "1.10.2", path = "derive", optional ... | 1 | 1 | 1 |
abbebe597e02ac0828bb987c73a3f037cd8d62b5 | Lokathor | 2025-10-03T19:03:13 | chore: Release bytemuck_derive version 1.10.2 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 42c78b4..c8e7faf 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.10.1"
+version = "1.10.2"
authors = ["Lokathor <zefria@gmail.com>"]
rep... | 1 | 1 | 1 |
d31d92cc774c36b19c642cac6ee8a8c247e79842 | zachs18 | 2025-10-03T19:00:04 | Extend `#[derive(TransparentWrapper)]` (#147)
* Extend #[derive(TransparentWrapper)] to allow types other than single idents in #[transparent(Type)].
* Update TransparentWrapper derive macro documentation.
* Suggest type alias workaround in TransparentWrapper error message | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index c50aad6..684d1e1 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -318,7 +318,10 @@ pub fn derive_maybe_pod(
///
/// If the struct only contains a single field, the `Wrapped` type will
/// automatically be determined. If there is more then one field i... | 3 | 85 | 31 |
3e18072a9f51a5fe07d729fc06221dfa4e38e686 | Lokathor | 2025-09-18T01:39:51 | chore: Release contiguous_bitset version 0.1.2 | diff --git a/contiguous_bitset/Cargo.toml b/contiguous_bitset/Cargo.toml
index 3594a31..f07c169 100644
--- a/contiguous_bitset/Cargo.toml
+++ b/contiguous_bitset/Cargo.toml
@@ -3,7 +3,7 @@ name = "contiguous_bitset"
description = "Stores a set of `bytemuck::Contiguous` values encoded as bits."
repository = "https://g... | 1 | 1 | 1 |
1295a373429856418f27fef07988c9cc46804e5e | Lokathor | 2025-09-12T05:00:11 | chore: Release contiguous_bitset version 0.1.1 | diff --git a/contiguous_bitset/Cargo.toml b/contiguous_bitset/Cargo.toml
index 8e442b0..3594a31 100644
--- a/contiguous_bitset/Cargo.toml
+++ b/contiguous_bitset/Cargo.toml
@@ -3,7 +3,7 @@ name = "contiguous_bitset"
description = "Stores a set of `bytemuck::Contiguous` values encoded as bits."
repository = "https://g... | 1 | 1 | 1 |
ca7d7808ce606e7a56b2d3937b9fa3b2db6e154f | Lokathor | 2025-09-12T04:58:25 | tell clippy to calm down. | diff --git a/src/lib.rs b/src/lib.rs
index a4b3dd0..e4d70be 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,6 +5,7 @@
#![allow(clippy::uninlined_format_args)]
#![allow(clippy::result_unit_err)]
#![allow(clippy::type_complexity)]
+#![allow(clippy::manual_is_multiple_of)]
#![cfg_attr(feature = "nightly_docs", feature(... | 1 | 2 | 1 |
f0fbcbd4a18dfa5f6f114116c7dff8201baa65b2 | Zavier Divelbiss | 2025-09-05T14:36:01 | impl `AnyBitPattern` for arrays of `MaybeUninit<T: AnyBitPattern>` (#317) | diff --git a/src/anybitpattern.rs b/src/anybitpattern.rs
index 3b98b09..43bbe26 100644
--- a/src/anybitpattern.rs
+++ b/src/anybitpattern.rs
@@ -62,3 +62,16 @@ unsafe impl<T: Pod> AnyBitPattern for T {}
)]
unsafe impl<T> AnyBitPattern for core::mem::MaybeUninit<T> where T: AnyBitPattern
{}
+
+#[cfg(all(feature = "ze... | 1 | 13 | 0 |
1591096d4ffed95678000cb69a71511c7bffdc9d | lokathor | 2025-09-04T17:30:43 | spelling. | diff --git a/Cargo.toml b/Cargo.toml
index d71fcd1..04c95a1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ keywords = ["transmute", "bytes", "casting"]
categories = ["encoding", "no-std"]
edition = "2018"
license = "Zlib OR Apache-2.0 OR MIT"
-exclude = ["/pedantic.bat", "derive/", "contigous_bitset/"]
+ex... | 1 | 1 | 1 |
a48ca84199931f0a6f98757d36162226bf62d069 | lokathor | 2025-09-04T17:28:32 | fix crate name | diff --git a/contiguous_bitset/Cargo.toml b/contiguous_bitset/Cargo.toml
index ee575e2..8e442b0 100644
--- a/contiguous_bitset/Cargo.toml
+++ b/contiguous_bitset/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "contigous_bitset"
+name = "contiguous_bitset"
description = "Stores a set of `bytemuck::Contiguous` values enc... | 1 | 1 | 1 |
49c126ab91ab0ac9a14192fe27f4b3e20047ea6e | lokathor | 2025-09-04T17:28:16 | rename to fix typo. | diff --git a/contigous_bitset/Cargo.toml b/contiguous_bitset/Cargo.toml
similarity index 100%
rename from contigous_bitset/Cargo.toml
rename to contiguous_bitset/Cargo.toml
diff --git a/contigous_bitset/src/lib.rs b/contiguous_bitset/src/lib.rs
similarity index 100%
rename from contigous_bitset/src/lib.rs
rename to con... | 2 | 0 | 0 |
5b2eb8524ecf7f772687029271a060135e45fadc | Nicolas Sarlin | 2025-08-22T17:25:52 | chore: use new stable avx512 types from rust 1.89 (#322)
* chore: use new stable avx512 types from rust 1.89
* chore: remove uses of the `nightly_stdsimd` feature | diff --git a/Cargo.toml b/Cargo.toml
index 98ade98..9ecd19b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,7 +37,7 @@ min_const_generics = [] # MSRV 1.51: support arrays via min_const_generics
wasm_simd = [] # MSRV 1.54.0: support wasm simd types
aarch64_simd = [] # MSRV 1.59.0: support aarch64 simd types
-avx5... | 4 | 9 | 16 |
c069a2f6a4c7f3416257d0378c799085aa5626bb | Lokathor | 2025-08-07T20:07:25 | chore: Release bytemuck version 1.23.2 | diff --git a/Cargo.toml b/Cargo.toml
index a70c95b..98ade98 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.23.1"
+version = "1.23.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
7fef8d93ba0ed0703ba854bedb8ecd18c1b8cbca | Lokathor | 2025-08-07T19:55:56 | bump derive minimum version. should be a semver patch effect. | diff --git a/Cargo.toml b/Cargo.toml
index c818981..a70c95b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -105,7 +105,7 @@ nightly_float = []
nightly_docs = []
[dependencies]
-bytemuck_derive = { version = "1.4.1", path = "derive", optional = true }
+bytemuck_derive = { version = "1.10.1", path = "derive", optional =... | 1 | 1 | 1 |
2524f62b76b0ec4804e3f4af4510fcd1253ffe66 | Lokathor | 2025-08-06T21:26:26 | chore: Release bytemuck_derive version 1.10.1 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index e038877..42c78b4 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.10.0"
+version = "1.10.1"
authors = ["Lokathor <zefria@gmail.com>"]
rep... | 1 | 1 | 1 |
374df78558e3d1a3ad51079054aa4e3dd6a3a53b | zachs18 | 2025-08-06T21:20:49 | Make the `Pod`/`NoUninit` derive macros use `assert!` to check size equality, instead of `transmute`. (#320) | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index ea09959..59d7ea4 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -80,7 +80,7 @@ impl Derivable for Pod {
match &input.data {
Data::Struct(_) => {
let assert_no_padding = if !completly_packed {
- Some(generate_as... | 1 | 13 | 8 |
6633a5113f2ca66f7c7e9174136076225f9a7458 | tianshu | 2025-07-22T14:30:32 | Fix a typo (#319)
Co-authored-by: DogLooksGood <doglooksgood@gmail.com> | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 53955d3..ea09959 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -281,7 +281,7 @@ impl Derivable for NoUninit {
// There's `#[repr(C)]`/`[repr(C, int)]` and `#[repr(int)]`.
// `#[repr(C)]` is equivalent to a struct cont... | 1 | 1 | 1 |
1c9e7ba196bd2bee43704c166d84778e467cc6e8 | Lokathor | 2025-07-19T15:16:57 | chore: Release bytemuck_derive version 1.10.0 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 5a8dd02..e038877 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.9.3"
+version = "1.10.0"
authors = ["Lokathor <zefria@gmail.com>"]
repo... | 1 | 1 | 1 |
0e11472150c3b63cbae3b445230fe074405bd2d2 | Tom Dohrmann | 2025-06-09T14:25:26 | add support for deriving NoUninit on enums with fields (#292)
* add support for deriving NoUninit on enums with fields
We check for padding like we do for structs except that we also
consider the enum discriminant when calculating the unpadded size.
* improve support for #[repr(C)] enums
Unfortunately, the integer ... | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index 26ecfc1..c50aad6 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -260,7 +260,12 @@ pub fn derive_zeroable(
///
/// If applied to an enum:
/// - The enum must be explicit `#[repr(Int)]`, `#[repr(C)]`, or both
-/// - All variants must be fieldless
+///... | 6 | 256 | 32 |
ebb132677b7599ac30b6455d64a091edc73ddb95 | lokathor | 2025-06-08T16:04:36 | chore: Release bytemuck version 1.23.1 | diff --git a/Cargo.toml b/Cargo.toml
index 8766b07..c818981 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.23.0"
+version = "1.23.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
53854c371976799dce805e7ed8fb957453da678a | lokathor | 2025-06-08T15:55:03 | we must limit the impl to only being defined on windows, where the stdcall ABI is used. | diff --git a/src/zeroable_in_option.rs b/src/zeroable_in_option.rs
index 1ff3413..f5c5eb0 100644
--- a/src/zeroable_in_option.rs
+++ b/src/zeroable_in_option.rs
@@ -52,15 +52,15 @@ macro_rules! impl_for_fn {
unsafe impl<$($ArgTy,)* R> ZeroableInOption for unsafe extern "C" fn($($ArgTy,)*) -> R {}
unsa... | 1 | 2 | 2 |
aa9a4a91e5af3f89cd89dfef133182c25204fe7c | Lokathor | 2025-06-08T15:53:10 | Update zeroable_in_option.rs (#314) | diff --git a/src/zeroable_in_option.rs b/src/zeroable_in_option.rs
index ff40fd7..1ff3413 100644
--- a/src/zeroable_in_option.rs
+++ b/src/zeroable_in_option.rs
@@ -52,6 +52,8 @@ macro_rules! impl_for_fn {
unsafe impl<$($ArgTy,)* R> ZeroableInOption for unsafe extern "C" fn($($ArgTy,)*) -> R {}
unsafe... | 1 | 2 | 0 |
028ff3bec68ab9c123dc578b74a7af4a72a37609 | Lokathor | 2025-04-28T23:34:43 | chore: Release bytemuck version 1.23.0 | diff --git a/Cargo.toml b/Cargo.toml
index fab5edd..8766b07 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.22.0"
+version = "1.23.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
90db36000f622d0a9c5b678812ccadd96823248a | Joshua Megnauth | 2025-04-08T23:30:19 | Impl core's Error trait on Rust 1.81+ (#311) | diff --git a/Cargo.toml b/Cargo.toml
index 077b7ed..fab5edd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,6 +64,9 @@ pod_saturating = []
# MSRV 1.71: Adds ZeroableInOption impl for fn-ptrs with -unwind
zeroable_unwind_fn = []
+# MSRV 1.81: Impls core::error:Error for error types
+impl_core_error = []
+
# Enables... | 3 | 12 | 0 |
46d0910f3a3a9850319a2f64291407b2289493e4 | Connor Horman | 2025-03-22T19:58:31 | Extend #308 with `-unwind` support (#309)
* Extend #308 with `-unwind` support
* Fix the fact that 1.34 errors on invalid ABI tags in parse | diff --git a/Cargo.toml b/Cargo.toml
index bd8e4d0..077b7ed 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -61,6 +61,9 @@ track_caller = []
# MSRV 1.74.0 Pod/Zeroable implementations for `core::num::Saturating`
pod_saturating = []
+# MSRV 1.71: Adds ZeroableInOption impl for fn-ptrs with -unwind
+zeroable_unwind_fn = ... | 2 | 18 | 0 |
6751adc3e40aa71ee22abfd19b97769b40d1f280 | Thom Chiovoloni | 2025-03-22T19:31:33 | Impl ZeroablInOption for several function types. (#308) | diff --git a/src/zeroable_in_option.rs b/src/zeroable_in_option.rs
index c4cf158..3787b1b 100644
--- a/src/zeroable_in_option.rs
+++ b/src/zeroable_in_option.rs
@@ -33,3 +33,29 @@ unsafe impl<T: ?Sized> ZeroableInOption for &'_ mut T {}
#[cfg(feature = "extern_crate_alloc")]
#[cfg_attr(feature = "nightly_docs", doc(c... | 1 | 26 | 0 |
66569e6cc7b3c7a7edadeb80219aa23386ed7554 | Lokathor | 2025-03-19T20:22:15 | chore: Release bytemuck_derive version 1.9.2 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index b006a50..1414bd5 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.9.1"
+version = "1.9.2"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
9b087bb7e5192b71a3e0ec49571a60106266f0a5 | Lokathor | 2025-03-18T21:13:59 | chore: Release bytemuck_derive version 1.9.1 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index c7c1cef..e3b8959 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.9.0"
+version = "1.9.1"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
920e1c7b837fe5a5b7f465108cea4b5e4a4af2aa | Tom Dohrmann | 2025-03-18T18:26:31 | fix deriving CheckedBitPattern on packed struct (#291)
* fix deriving CheckedBitPattern on packed struct
When a field in a packed struct is not sufficiently aligned, it's
illegal to create a reference to it. Consequently, our Debug
implementation should not create references.
This does not affect enums because enums... | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 2093561..f8cc01c 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -623,7 +623,7 @@ fn generate_checked_bit_pattern_struct(
impl ::core::fmt::Debug for #bits_ty {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::c... | 2 | 8 | 1 |
d1d918b2879c62fa946a9534ab8ee0760106b0fa | Lokathor | 2025-03-03T04:19:59 | chore: Release bytemuck version 1.22.0 | diff --git a/Cargo.toml b/Cargo.toml
index a014cf9..bd8e4d0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.21.0"
+version = "1.22.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
ee2f71f255b12304d83b721efa4e4f450e8f1719 | Connor Horman | 2025-02-24T19:05:24 | Add `pod_saturating` feature (#303) | diff --git a/Cargo.toml b/Cargo.toml
index e2a233c..a014cf9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -58,6 +58,9 @@ unsound_ptr_pod_impl = []
# MSRV 1.46.0: adds the `#[track_caller]` attribute to functions which may panic
track_caller = []
+# MSRV 1.74.0 Pod/Zeroable implementations for `core::num::Saturating`
... | 4 | 10 | 0 |
e02369556fd7166fe227146fb93a056883a6544d | Eric Seppanen | 2025-02-08T00:15:42 | bump bytemuck_derive dependency to >= 1.4.1 (#301)
Derived traits on structs with generic parameters is broken in bytemuck_derive 1.4.0 (#168), which can cause builds to fail in confusing ways.
Fixes #300. | diff --git a/Cargo.toml b/Cargo.toml
index 0a0ac5b..e2a233c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -93,7 +93,7 @@ nightly_float = []
nightly_docs = []
[dependencies]
-bytemuck_derive = { version = "1.4", path = "derive", optional = true }
+bytemuck_derive = { version = "1.4.1", path = "derive", optional = true... | 1 | 1 | 1 |
9ec593db1dadcf0c3d0d34caa5128174d38b07e1 | zachs18 | 2025-02-04T01:53:05 | Implement Send and Sync for BoxBytes. (#299) | diff --git a/src/allocation.rs b/src/allocation.rs
index e116f42..dab0cd4 100644
--- a/src/allocation.rs
+++ b/src/allocation.rs
@@ -783,6 +783,12 @@ pub struct BoxBytes {
layout: Layout,
}
+// SAFETY: `BoxBytes` is semantically a `Box<[u8], Global>` with a different allocation alignment,
+// `Box<[u8], Global>` ... | 1 | 6 | 0 |
1f6afb3b15c293c996f9fa2da86d3243eac45a14 | Tobias Bucher | 2025-01-14T22:48:32 | Add a `pack1` as a related crate for packed integers etc. (#296)
CC #295. | diff --git a/src/lib.rs b/src/lib.rs
index 3ae485a..592b910 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -88,6 +88,12 @@
//! * `must_cast`: Provides the `must_` functions, which will compile error if
//! the requested cast can't be statically verified.
//! * `const_zeroed`: Provides a const version of the `zeroed` ... | 1 | 6 | 0 |
c254af30fcb57ca21269963b129f42574924f7c5 | Lokathor | 2025-01-09T23:58:29 | chore: Release bytemuck_derive version 1.9.0 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 1e1cef3..c7c1cef 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.8.1"
+version = "1.9.0"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
417e98919ea626b633d189b37ec8d5bef6352354 | Lokathor | 2025-01-09T23:57:36 | fix changelog which cargo-release goofed because crates.io goofed. | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index c7c1cef..1e1cef3 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.9.0"
+version = "1.8.1"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
621848fcf09ac42000e3b9c548f17f252c7e399c | Lokathor | 2024-12-20T19:08:08 | chore: Release bytemuck version 1.21.0 | diff --git a/Cargo.toml b/Cargo.toml
index 7aa2fe0..0a0ac5b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.20.0"
+version = "1.21.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
45fbae7d8ddb8d75353588920c6fab16943e96bd | Lokathor | 2024-12-20T19:00:47 | chore: Release bytemuck_derive version 1.8.1 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 5acc887..b58884c 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.8.0"
+version = "1.8.1"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
d6c589f9aa91d1f23053aa606c30104c57541c49 | zachs18 | 2024-12-17T01:06:29 | Cargo.toml: add transparentwrapper_extra to latest_stable_rust, and expand on comment for alloc_uninit. (#289)
src/checked.rs: Add doc-link. | diff --git a/Cargo.toml b/Cargo.toml
index 5476e2c..7aa2fe0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,7 +49,8 @@ transparentwrapper_extra = []
const_zeroed = [] # MSRV 1.75.0: support const `zeroed()`
-alloc_uninit = [] # MSRV 1.82.0: support `zeroed_*rc*`
+# MSRV 1.82.0: support `zeroed_*rc*` when combined ... | 2 | 4 | 2 |
9801bb977401136abece5c255669f7205a61b6ea | Lokathor | 2024-12-17T00:25:26 | Update lib.rs (#290) | diff --git a/src/lib.rs b/src/lib.rs
index 3d2407b..3ae485a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,6 @@
#![no_std]
#![warn(missing_docs)]
+#![allow(unused_mut)]
#![allow(clippy::match_like_matches_macro)]
#![allow(clippy::uninlined_format_args)]
#![allow(clippy::result_unit_err)] | 1 | 1 | 0 |
227d7fe6e195587c15afd8bf334d0e5957f247ac | Tom Dohrmann | 2024-11-30T16:07:02 | hide `unexpected_cfgs` warnings in proc-macro generated code (#287)
* replace #[derive(Debug)] with manual impls
The new impls should be identical, but they have the advantage that we
can move them around. See the next patch for why this is useful.
* allow unexpected_cfgs lint
AFAICT it's not possible to set... | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 02a0e41..2093561 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -607,19 +607,27 @@ fn generate_checked_bit_pattern_struct(
let field_name = &field_names[..];
let field_ty = &field_tys[..];
- let derive_dbg =
- quote!(#[cfg_attr(... | 1 | 44 | 21 |
9bf993b1e487b1e7242aeb970e0d06fa7e4ae166 | Lokathor | 2024-11-19T17:28:30 | chore: Release bytemuck version 1.20.0 | diff --git a/Cargo.toml b/Cargo.toml
index c273325..4e6c92a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.19.0"
+version = "1.20.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
1400815a33d28754d619000fe65d5f492fd1ead5 | Alphyr | 2024-11-19T15:01:37 | Improve `fill_zeroes`' use of `ptr::write_bytes` (#284) | diff --git a/src/lib.rs b/src/lib.rs
index 2d7f270..a3700d1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -532,8 +532,8 @@ pub fn fill_zeroes<T: Zeroable>(slice: &mut [T]) {
slice.iter_mut().for_each(write_zeroes);
} else {
// Otherwise we can be really fast and just fill everthing with zeros.
- let len =... | 1 | 2 | 2 |
13f4ae0cdf1f6481940c12451407c48d159fc284 | Alphyr | 2024-11-12T19:42:04 | Add functions to allocate zeroed `Arc` and `Rc` (#283)
These require rustc 1.82 | diff --git a/Cargo.toml b/Cargo.toml
index ee1ccca..c273325 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,6 +47,8 @@ transparentwrapper_extra = []
const_zeroed = [] # MSRV 1.75.0: support const `zeroed()`
+alloc_uninit = [] # MSRV 1.82.0: support `zeroed_*rc*`
+
# Do not use if you can avoid it, because this is... | 2 | 35 | 0 |
af8d110201aaf6e5846f146b73207f7887327638 | zachs18 | 2024-10-31T05:30:11 | More `TransparentWrapper` impls (`core::cmp::Reverse` and `core::num::Saturating`) (#269)
* impl<T> TransparentWrapper<T> for core::cmp::Reverse<T>
* impl<T> TransparentWrapper<T> for core::num::Saturating<T>, with a new feature for non-base-MSRV stdlib TransparentWrapper impls.
* Restrict TransparentWrapper<T> ... | diff --git a/Cargo.toml b/Cargo.toml
index 67ff212..ee1ccca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,6 +40,11 @@ aarch64_simd = [] # MSRV 1.59.0: support aarch64 simd types
must_cast = [] # MSRV 1.64.0: support the `must` module.
+# Adds `TransparentWrapper` impls for stdlib types newer than bytemuck's base... | 2 | 22 | 0 |
79a15d0a3f7f6eeaf816e05a0420c04d92be9ff5 | Gnome! | 2024-10-19T15:14:32 | Remove incorrect spanned quote usage (#279) | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index ed8db9f..02a0e41 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -2,7 +2,7 @@
use std::{cmp, convert::TryFrom};
use proc_macro2::{Ident, Span, TokenStream, TokenTree};
-use quote::{quote, quote_spanned, ToTokens};
+use quote::{quote, ToT... | 2 | 10 | 12 |
7b98ff1cec8df2be270410f2c42c655f5abd66b2 | Lokathor | 2024-10-13T04:09:07 | chore: Release bytemuck version 1.19.0 | diff --git a/Cargo.toml b/Cargo.toml
index fbc8f73..67ff212 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.18.0"
+version = "1.19.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
da9b1874d83329a13f1aee8b16823df6ebf9d889 | Christofer Nolander | 2024-10-13T04:06:43 | add `track_caller` feature (#276)
closes #68 | diff --git a/Cargo.toml b/Cargo.toml
index 2362266..fbc8f73 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -45,6 +45,9 @@ const_zeroed = [] # MSRV 1.75.0: support const `zeroed()`
# Do not use if you can avoid it, because this is **unsound**!!!!
unsound_ptr_pod_impl = []
+# MSRV 1.46.0: adds the `#[track_caller]` attr... | 6 | 51 | 16 |
1c09edf7b08ad9c052585b73b9903b5c8d70bb04 | Timothy Hoffman | 2024-10-10T04:18:57 | fix #274 (#275) | diff --git a/src/checked.rs b/src/checked.rs
index 3299ce8..c3b131e 100644
--- a/src/checked.rs
+++ b/src/checked.rs
@@ -292,7 +292,7 @@ pub fn try_pod_read_unaligned<T: CheckedBitPattern>(
}
}
-/// Try to cast `T` into `U`.
+/// Try to cast `A` into `B`.
///
/// Note that for this particular type of cast, alig... | 3 | 21 | 21 |
48952a0246ffb54b8cdea1c6adc561ee430420a3 | Lokathor | 2024-10-06T22:48:29 | chore: Release bytemuck_derive version 1.8.0 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 9011205..5acc887 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.7.1"
+version = "1.8.0"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
a637e1d983d0f21a3f7f94fe362d170858a5a5c2 | zachs18 | 2024-09-24T18:30:38 | derive(Zeroable) on fieldful enums and repr(C) enums (#257)
* Add support for deriving Zeroable for fieldful enums if:
1. the enum is repr(Int), repr(C), or repr(C, Int),
2. the enum has a variant with discriminant 0,
3. and all fields of the variant with discriminant 0 are Zeroable.
* Allow using derive(Zeroa... | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index 806a72f..26ecfc1 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -114,14 +114,26 @@ pub fn derive_anybitpattern(
proc_macro::TokenStream::from(expanded)
}
-/// Derive the `Zeroable` trait for a struct
+/// Derive the `Zeroable` trait for a type.
... | 3 | 290 | 106 |
bb368799c3f955421c968caf4f1ce3e0739d2c9a | Thom Chiovoloni | 2024-09-06T01:57:56 | Improve documentation of features. (#272)
* Improve documentation of nightly features
* Document undocumented features | diff --git a/Cargo.toml b/Cargo.toml
index c6577db..2362266 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,10 +13,16 @@ exclude = ["/pedantic.bat"]
[features]
# In v2 we'll fix these names to be more "normal".
+
+# Enable deriving the various `bytemuck` traits.
derive = ["bytemuck_derive"]
+# Enable features requ... | 1 | 10 | 1 |
860c391345a2ec61fecf3cd46bcdde1add01caf9 | Lokathor | 2024-09-06T01:53:43 | chore: Release bytemuck version 1.18.0 | diff --git a/Cargo.toml b/Cargo.toml
index df45860..c6577db 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.17.1"
+version = "1.18.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
4c535f9a77aa8944e6bfd91f2ac3e43b5d7601ea | Thom Chiovoloni | 2024-09-06T01:51:06 | Clean up Cargo.toml (#271) | diff --git a/Cargo.toml b/Cargo.toml
index 12b3e54..df45860 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,15 +39,6 @@ const_zeroed = [] # MSRV 1.75.0: support const `zeroed()`
# Do not use if you can avoid it, because this is **unsound**!!!!
unsound_ptr_pod_impl = []
-# NOT SEMVER SUPPORTED! TEMPORARY ONLY!
-nigh... | 1 | 11 | 23 |
19065703a59ad0ef742db3fa86aff08a55345575 | Thom Chiovoloni | 2024-09-06T01:36:58 | Add a convenience feature indicating you're on the latest stable version of Rust (#270) | diff --git a/Cargo.toml b/Cargo.toml
index 337caa7..12b3e54 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -48,6 +48,23 @@ nightly_float = []
# Improved documentation using the nightly toolchain
nightly_docs = []
+# Enables all features that are both sound and supported on the latest stable
+# version of Rust, with th... | 1 | 17 | 0 |
dc059fd187c45cd9739aeedabd5e75e527058f90 | Lokathor | 2024-08-27T16:34:15 | chore: Release bytemuck version 1.17.1 | diff --git a/Cargo.toml b/Cargo.toml
index 512db65..337caa7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.17.0"
+version = "1.17.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
3f42bec5393f586189459e2db03b39f8f9438997 | Lukasz Anforowicz | 2024-08-27T16:30:57 | Force `#[repr(C)]` layout to guarantee same offset of `union` fields. (#268)
https://rust-lang.github.io/unsafe-code-guidelines/layout/unions.html
points out that
> [...] the default layout of Rust unions is, in general,
> unspecified.
>
> That is, there are no general guarantees about the offse... | diff --git a/src/lib.rs b/src/lib.rs
index cafab3b..ca7c1d6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -127,6 +127,7 @@ macro_rules! transmute {
// since the compiler hedges that the type being borrowed could have interior mutability.
($srcty:ty; $dstty:ty; $val:expr) => {
{
+ #[repr(C)]
union T... | 1 | 1 | 0 |
3c42ba7f23e4c17990322e78a574d0df749030cf | Lokathor | 2024-08-16T06:43:55 | chore: Release bytemuck version 1.17.0 | diff --git a/Cargo.toml b/Cargo.toml
index 8b82ddb..512db65 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.16.3"
+version = "1.17.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
faff80450ac6f9a218edd5e16d18ac5d1ea26f3d | Lokathor | 2024-08-16T06:40:22 | chore: Release bytemuck_derive version 1.7.1 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index f27ed73..9011205 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.7.0"
+version = "1.7.1"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
bb62be5baa77c240965d3d9b8844b2cf5ed74d4d | zachs18 | 2024-08-11T07:59:50 | Remove "dangling" terminology for zero-sized pointees. (#262)
* Update safety comment on BoxBytes pointer field.
* Update mentions of "dangling" pointers elsewhere in src/allocation.rs. | diff --git a/src/allocation.rs b/src/allocation.rs
index bb4032f..8c5ac80 100644
--- a/src/allocation.rs
+++ b/src/allocation.rs
@@ -68,9 +68,10 @@ pub fn try_cast_box<A: NoUninit, B: AnyBitPattern>(
#[inline]
pub fn try_zeroed_box<T: Zeroable>() -> Result<Box<T>, ()> {
if size_of::<T>() == 0 {
- // This will n... | 1 | 12 | 10 |
5eecd333183762078be87b7b499dd80cd83bf45a | zachs18 | 2024-08-11T07:59:06 | Make must_cast by-value and by-shared-ref functions const (#261)
* Make must_cast by-value and by-shared-ref functions const (but not by-mut-ref)
* Add comment for transmute! macro new arm, and update Cargo.toml comment for must_cast MSRV. | diff --git a/Cargo.toml b/Cargo.toml
index ffa457b..8b82ddb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,7 +32,7 @@ min_const_generics = [] # MSRV 1.51: support arrays via min_const_generics
wasm_simd = [] # MSRV 1.54.0: support wasm simd types
aarch64_simd = [] # MSRV 1.59.0: support aarch64 simd types
-must... | 3 | 16 | 5 |
243302d3effc71a295cf096fae9ae5d7864a81ae | Richard Pringle | 2024-08-02T14:09:49 | Add `bytemuck` attribute to `NoUninit` derive (#259) | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index cfe6270..806a72f 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -221,7 +221,7 @@ pub fn derive_zeroable(
/// - The enum must be explicit `#[repr(Int)]`, `#[repr(C)]`, or both
/// - All variants must be fieldless
/// - The enum must contain no generi... | 1 | 1 | 1 |
e1baf85f097a8fd4cda495b7b4706838f8fe53af | zachs18 | 2024-07-31T03:59:13 | Fix box_bytes_zst test (#260) | diff --git a/tests/cast_slice_tests.rs b/tests/cast_slice_tests.rs
index 0f94f0b..7dbb45e 100644
--- a/tests/cast_slice_tests.rs
+++ b/tests/cast_slice_tests.rs
@@ -357,9 +357,15 @@ fn box_bytes_zst() {
let _: Box<[u8]> = from_box_bytes(x);
let x: BoxBytes = box_bytes_of(Box::new([0u8; 0]));
- let res: Result<... | 1 | 8 | 2 |
20f4a09404d79c9ab549efd8d3f5d82977368e4d | Lokathor | 2024-07-30T23:08:09 | chore: Release bytemuck version 1.16.3 | diff --git a/Cargo.toml b/Cargo.toml
index 0ccf3fa..ffa457b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.16.2"
+version = "1.16.3"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
291a9245187e794f295e86290acca5e70e95d1f3 | zachs18 | 2024-07-30T23:05:11 | Allow casting between slices of ZSTs and slices of non-ZSTs in all cases. (#256)
Casting ZST to non-ZST will result in a slice length of 0.
Casting non-ZST to ZST will only work if the input slice has length 0, and results in a slice length of 0; if the input slice is not of length 0, PodCastError::OutputSliceWouldHa... | diff --git a/src/allocation.rs b/src/allocation.rs
index 78c30ff..bb4032f 100644
--- a/src/allocation.rs
+++ b/src/allocation.rs
@@ -178,7 +178,7 @@ pub fn try_cast_slice_box<A: NoUninit, B: AnyBitPattern>(
{
// If the size in bytes of the underlying buffer does not match an exact
// multiple of the ... | 6 | 93 | 56 |
758774d45142aa8ca8d6fbd965ba7a0325891bd8 | Lokathor | 2024-07-30T22:37:41 | chore: Release bytemuck version 1.16.2 | diff --git a/Cargo.toml b/Cargo.toml
index dda25b9..0ccf3fa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.16.1"
+version = "1.16.2"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
1c75146bb6ae0ff7b6e3059fac13f5164646e8da | zachs18 | 2024-07-30T22:23:38 | Fix UB when dropping BoxBytes owning a zero-sized layout (#258) | diff --git a/src/allocation.rs b/src/allocation.rs
index ae0dca1..78c30ff 100644
--- a/src/allocation.rs
+++ b/src/allocation.rs
@@ -742,8 +742,9 @@ impl<I: ?Sized, T: ?Sized + TransparentWrapper<I>> TransparentWrapperAlloc<I>
/// As `Box<[u8]>`, but remembers the original alignment.
pub struct BoxBytes {
- // SAF... | 2 | 22 | 4 |
005ee3254fdfa63d67d024cfc598319331dab0cb | zachs18 | 2024-07-21T16:24:43 | Fix panics in `try_cast_slice_box` etc (#254)
* Fix panics in try_cast_slice_{box,rc,arc},cast_vec.
Casting from non-empty non-ZST slices to ZST slices now returns Err(SizeMismatch) (instead of panicking).
Casting from empty non-ZST slices to ZST slices is allowed and returns an empty slice (instead of panicking).... | diff --git a/src/allocation.rs b/src/allocation.rs
index 1763ffd..ae0dca1 100644
--- a/src/allocation.rs
+++ b/src/allocation.rs
@@ -21,7 +21,7 @@ use alloc::{
vec::Vec,
};
use core::{
- mem::ManuallyDrop,
+ mem::{size_of_val, ManuallyDrop},
ops::{Deref, DerefMut},
};
@@ -172,7 +172,10 @@ pub fn try_cast_s... | 2 | 162 | 11 |
02ffd53a4e42497574f06eba5907212b66a71a3a | Lokathor | 2024-06-19T03:26:50 | chore: Release bytemuck version 1.16.1 | diff --git a/Cargo.toml b/Cargo.toml
index bfa5d8f..dda25b9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.16.0"
+version = "1.16.1"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
9b81537c5fc4db6f529f388b0af8cf1fe97b6764 | Trevor Gross | 2024-06-19T03:24:29 | Support `Zeroable` and `Pod` for `f16` and `f128` (#251)
These are gated under a new feature flag `nightly_float`.
Fixes: <https://github.com/Lokathor/bytemuck/issues/250> | diff --git a/Cargo.toml b/Cargo.toml
index 05a2715..bfa5d8f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -42,6 +42,8 @@ unsound_ptr_pod_impl = []
# NOT SEMVER SUPPORTED! TEMPORARY ONLY!
nightly_portable_simd = []
nightly_stdsimd = []
+# Enable `f16` and `f128`
+nightly_float = []
# Improved documentation using the... | 4 | 11 | 0 |
c9540064f31c7c1b63ce9737de690329b519510a | Lokathor | 2024-05-28T18:22:59 | Fix the errors CI is showing (#247)
* Change #![allow(clippy::missing_docs_in_private_items)] to #[allow(clippy::missing_docs_in_private_items)], also rustfmt went wild
* fix for 1.34 building.
* clippy be quiet | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 65aca40..89fc6c4 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -25,13 +25,17 @@ pub trait Derivable {
fn implies_trait(_crate_name: &TokenStream) -> Option<TokenStream> {
None
}
- fn asserts(_input: &DeriveInput, _crate_name: &... | 5 | 124 | 67 |
a630404e1848ae178d80bbfeb2c41e48d36cbfc3 | Tom Dohrmann | 2024-05-28T17:53:32 | support deriving Zeroable for fieldless enums (#233)
* support deriving Zeroable for fieldless enums
* add test for deriving Zeroable on enum | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index abe27f1..65aca40 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -124,11 +124,43 @@ impl Derivable for Zeroable {
Ok(syn::parse_quote!(#crate_name::Zeroable))
}
+ fn check_attributes(ty: &Data, attributes: &[Attribute]) -> Result<... | 2 | 41 | 1 |
9a27279008a0f841625f31d0afb963c9839629df | zachs18 | 2024-05-28T17:52:54 | Allow generics in `derive(ByteEq, ByteHash)`. (#219)
Note that the ergonomics are still not great, since `NoUninit` is also required to use `derive(ByteEq, ByteHash)`, and `derive(NoUninit)` doesn't support generics,
but that *explicitly* doesn't support generics, instead of silently ignoring generics like `derive(By... | diff --git a/derive/src/lib.rs b/derive/src/lib.rs
index ee8f235..cfe6270 100644
--- a/derive/src/lib.rs
+++ b/derive/src/lib.rs
@@ -377,7 +377,7 @@ pub fn derive_contiguous(
/// also does not implement `StructuralPartialEq` / `StructuralEq` like
/// `PartialEq` / `Eq` would. This means you can't pattern match on the... | 1 | 29 | 5 |
1c3751410ff8f21081e9e4622034cdeffd1d77f9 | Andrew Gazelka | 2024-05-28T17:31:06 | fix clippy lints (#137) | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 73329f0..abe27f1 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -407,7 +407,11 @@ impl Derivable for Contiguous {
quote!(),
quote! {
type Int = #integer_ty;
+
+ #![allow(clippy::missing_docs_in_private_item... | 2 | 7 | 5 |
f9f7bb10b39d98d3a1629ade0280a02ece5c32d4 | Urgau | 2024-05-24T19:21:58 | Address `unexpected_cfgs` warnings instead of allowing the lint (#243) | diff --git a/Cargo.toml b/Cargo.toml
index bde2736..05a2715 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,6 +49,9 @@ nightly_docs = []
[dependencies]
bytemuck_derive = { version = "1.4", path = "derive", optional = true }
+[lints.rust]
+unexpected_cfgs = { level = "deny", check-cfg = ['cfg(target_arch, values("sp... | 2 | 3 | 1 |
89885d160a0d5c9cb2d3762415b6ae31084b32b8 | Lokathor | 2024-05-24T17:54:29 | chore: Release bytemuck_derive version 1.6.1 | diff --git a/derive/Cargo.toml b/derive/Cargo.toml
index 6b960bd..619f11d 100644
--- a/derive/Cargo.toml
+++ b/derive/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck_derive"
description = "derive proc-macros for `bytemuck`"
-version = "1.6.0"
+version = "1.6.1"
authors = ["Lokathor <zefria@gmail.com>"]
repos... | 1 | 1 | 1 |
7094cb8b8e151cfb347089863a7005724163b192 | Jay White | 2024-05-24T17:52:56 | Ignore clippy::multiple_bound_locations lint. (#242) | diff --git a/derive/src/traits.rs b/derive/src/traits.rs
index 5ba6f9f..73329f0 100644
--- a/derive/src/traits.rs
+++ b/derive/src/traits.rs
@@ -317,8 +317,10 @@ impl Derivable for TransparentWrapper {
Ok(quote!(
const _: () = {
#[repr(transparent)]
+ #[allow(clippy::multiple_bound_l... | 1 | 2 | 0 |
4c46b919e2cccae67b3ef2648b1f746d0638afb3 | Lokathor | 2024-05-13T17:08:36 | chore: Release bytemuck version 1.16.0 | diff --git a/Cargo.toml b/Cargo.toml
index 2428d59..bde2736 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
-version = "1.15.0"
+version = "1.16.0"
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://gi... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.