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
e32f013a0623171464d0fe03a2f0663ac08701de
Lokathor
2021-12-16T06:20:30
(cargo-release) version 1.7.3
diff --git a/Cargo.toml b/Cargo.toml index b0fbc08..4b13931 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.7.3-alpha.0" +version = "1.7.3" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
dd01ccae422e882ad58aa579185bd03aaad29dc2
Lokathor
2021-12-16T06:16:38
nightly_portable_simd
diff --git a/Cargo.toml b/Cargo.toml index 521807a..b0fbc08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,9 @@ wasm_simd = [] # Until >= 1.54.0 is MSRV this is an off-by-default feature. # Do not use if you can avoid it, because this is unsound. unsound_ptr_pod_impl = [] +# NOT SEMVER SUPPORTED! TEMPORARY O...
4
25
4
3923766b67c010e66037f1ff55042525699a9060
Alphyr
2021-12-09T01:59:22
Impls for `PhantomPinned` and more `PhantomData` (#79)
diff --git a/src/pod.rs b/src/pod.rs index aef4af6..20b5648 100644 --- a/src/pod.rs +++ b/src/pod.rs @@ -66,6 +66,7 @@ unsafe impl<T: 'static> Pod for *const T {} unsafe impl<T: 'static> Pod for Option<NonNull<T>> {} unsafe impl<T: Pod> Pod for PhantomData<T> {} +unsafe impl Pod for PhantomPinned {} unsafe impl<T:...
2
2
0
944c90ca3ff486adef976dc47044815ef69b33a1
Christopher Serr
2021-10-15T19:46:52
Support WASM SIMD's `v128` type (#73) Due to the MSRV it is behind a feature gate.
diff --git a/Cargo.toml b/Cargo.toml index 5760aad..521807a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ extern_crate_alloc = [] extern_crate_std = ["extern_crate_alloc"] zeroable_maybe_uninit = [] min_const_generics = [] +wasm_simd = [] # Until >= 1.54.0 is MSRV this is an off-by-default feature. #...
4
12
1
9ea604addb102e72fd5a0baf4b8f287d52d956fb
Gauthier Segay
2021-10-15T19:45:16
minor doc patch to help users adjust their Cargo.toml for usage of the allocation module. (#76) * just pointer to how to set the crate feature helps the Cargo newbies to enable the feature easily while reading the documentation. * Update allocation.rs
diff --git a/src/allocation.rs b/src/allocation.rs index 33f796c..4c3f965 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -3,7 +3,10 @@ //! Stuff to boost things in the `alloc` crate. //! //! * You must enable the `extern_crate_alloc` feature of `bytemuck` or you will -//! not be able to use this module!...
1
4
1
e01c6b3a2df2bd1636fa67b73b9392e826c5de33
Lokathor
2021-07-23T05:30:18
(cargo-release) start next development iteration 1.7.3-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 04493a5..5760aad 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.7.2" +version = "1.7.3-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
be16fe2958fdfa2e79eb71fe94d8bfe7e3e64fc4
Lokathor
2021-07-23T05:29:59
(cargo-release) version 1.7.2
diff --git a/Cargo.toml b/Cargo.toml index dcf692e..04493a5 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.7.2-alpha.0" +version = "1.7.2" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
8ea087185e5493843ea45ca7fe6f436da78593ee
Lokathor
2021-07-23T05:26:51
(cargo-release) start next development iteration 1.7.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 836b477..dcf692e 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.7.1" +version = "1.7.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
5024fcc6fb77219ff59c6c61874fb3e83bb07632
Lokathor
2021-07-23T05:26:26
(cargo-release) version 1.7.1
diff --git a/Cargo.toml b/Cargo.toml index d6cf0b4..836b477 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.7.1-alpha.0" +version = "1.7.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
1a4c11a675327ea94b78de6a571b343892cb2ab8
Christopher Durham
2021-07-23T05:12:56
Replace unsound usage of transmute_copy (#72) * Use transmute! to enforce safer transmute_copy use * Test fix for #71
diff --git a/src/contiguous.rs b/src/contiguous.rs index b60f4a4..538514b 100644 --- a/src/contiguous.rs +++ b/src/contiguous.rs @@ -1,5 +1,4 @@ use super::*; -use core::mem::{size_of, transmute_copy}; /// A trait indicating that: /// @@ -127,10 +126,10 @@ pub unsafe trait Contiguous: Copy + 'static { // th...
4
32
13
6db9c1944b0604171a70e178bcdd1db1a4ce4dd2
Lokathor
2021-06-13T14:42:13
(cargo-release) start next development iteration 1.7.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 73e22ed..d6cf0b4 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.7.0" +version = "1.7.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
19c41fb116885bd03687e56ed2c846f168534604
Lokathor
2021-06-13T14:41:56
(cargo-release) version 1.7.0
diff --git a/Cargo.toml b/Cargo.toml index e10a615..73e22ed 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.7.0-alpha.0" +version = "1.7.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
84397ec62fb8707c9c9e7a591876c7c5f30ac211
Lokathor
2021-06-13T14:17:30
(cargo-release) start next development iteration 1.6.4-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 050e43d..75f16ab 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.6.3" +version = "1.6.4-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
fa438707868fe2a62c198ae253c81720edddc2c5
Lokathor
2021-06-13T14:17:13
(cargo-release) version 1.6.3
diff --git a/Cargo.toml b/Cargo.toml index 38358b7..050e43d 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.6.3-alpha.0" +version = "1.6.3" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
fd901461adbca0031d4b717781b0503dc838d15f
Lokathor
2021-06-13T14:14:37
(cargo-release) start next development iteration 1.6.3-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 03ed2d0..38358b7 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.6.2" +version = "1.6.3-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
987baf6273226f248860a55c2c526e27f67db0d4
Lokathor
2021-06-13T14:14:12
(cargo-release) version 1.6.2
diff --git a/Cargo.toml b/Cargo.toml index 0bcb36f..03ed2d0 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.6.2-alpha.0" +version = "1.6.2" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
291b2d251395ca85b66825a46d92e34fa6e369d4
Daniel McNab
2021-06-13T14:12:24
Just gate the Display impl instead (#69) The old version didn't compile (because of the extra semicolon)
diff --git a/src/lib.rs b/src/lib.rs index 1854fbe..89b4d5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -231,12 +231,9 @@ pub enum PodCastError { /// exact. AlignmentMismatch, } +#[cfg(not(target_arch = "spirv"))] impl core::fmt::Display for PodCastError { fn fmt(&self, f: &mut core::fmt::Formatter) -> core:...
1
1
4
8c8b0a71e9296ad9430a015ce7dfd745cc030a6c
Lokathor
2021-06-12T01:16:30
(cargo-release) start next development iteration 1.6.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 85e6385..0bcb36f 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.6.1" +version = "1.6.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
223ee7deaf7e12aa89e4da1901431e5d7c28fd91
Lokathor
2021-06-12T01:16:08
(cargo-release) version 1.6.1
diff --git a/Cargo.toml b/Cargo.toml index 6a5fd60..85e6385 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.6.1-alpha.0" +version = "1.6.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
043c18b4ba80b2b1285be60efe75d41462fccc80
Daniel McNab
2021-06-11T19:30:50
Allow building on spir-v (#67) * Allow building on spir-v * Remove spurious `self`
diff --git a/src/lib.rs b/src/lib.rs index 9a8c0f7..1854fbe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,11 +100,19 @@ possibility code branch. /// Immediately panics. #[cold] #[inline(never)] -fn something_went_wrong(src: &str, err: PodCastError) -> ! { +fn something_went_wrong(_src: &str, _err: PodCastError) -...
1
14
2
c33343ddfbb265db8060ffb146d0ac24e5b9fd5a
Lokathor
2021-06-10T20:10:58
(cargo-release) start next development iteration 1.6.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index a8e0602..6a5fd60 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.6.0" +version = "1.6.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
37b82b32c65ab99a2b668d3daf6a2742ade70371
Lokathor
2021-06-10T20:10:35
(cargo-release) version 1.6.0
diff --git a/Cargo.toml b/Cargo.toml index 8374980..a8e0602 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.5.2-alpha.0" +version = "1.6.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
99ecb1f6cbd66438b4aa38ec743c41ab0bc4c1c3
Lokathor
2021-06-10T20:05:15
rename "unwrap" to "peel".
diff --git a/src/transparent.rs b/src/transparent.rs index 6fb53bc..fb1dddf 100644 --- a/src/transparent.rs +++ b/src/transparent.rs @@ -4,10 +4,11 @@ use super::*; /// around the `Inner` value. /// /// This allows safely copy transmuting between the `Inner` type and the -/// `TransparentWrapper` type. -/// Functi...
2
32
32
cd8dbd64e9e45c6562a9d5f78a7430509462977d
Connor Horman
2021-06-05T14:25:57
Attach min_const_generics to a crate feature (#63) * Attach min_const_generics to a crate feature * Remove `min_const_generics` detection logic
diff --git a/Cargo.toml b/Cargo.toml index 023aaf6..8374980 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ extern_crate_alloc = [] extern_crate_std = ["extern_crate_alloc"] zeroable_maybe_uninit = [] derive = ["bytemuck_derive"] +min_const_generics = [] [dependencies] # use the upper line for testing...
6
18
50
f3e16c7051b561b027c797823b3ca16e7133028d
Zakarum
2021-04-02T01:56:49
Implement Pod and Zeroable for arrays of any size (#59) * Implement Pod and Zeroable for arrays of any size Only when rustc version is 1.51 or newer * Rename cfg flag after feature name
diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..6a6cadc --- /dev/null +++ b/build.rs @@ -0,0 +1,45 @@ +use std::{ + env, + process::Command, + str::{self, FromStr}, +}; + +fn main() { + let minor = match rustc_minor_version() { + Some(minor) => minor, + None => return, + }; + + if minor...
4
54
0
08a4b8fbc2145d2910cfa35b98eda3c4941bede9
Lokathor
2021-02-18T04:46:55
(cargo-release) start next development iteration 1.5.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 1e051d2..023aaf6 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.5.1" +version = "1.5.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
6f1c78e82486bcfa0da5d10970c815ec4d4a0738
Lokathor
2021-02-18T04:46:34
(cargo-release) version 1.5.1
diff --git a/Cargo.toml b/Cargo.toml index f403286..1e051d2 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.5.1-alpha.0" +version = "1.5.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
e5d5061854e6c7a7bdecb8d82729e0406d22587c
Lokathor
2021-02-18T04:43:32
adjust the code to match the claims of the docs. (#53)
diff --git a/src/lib.rs b/src/lib.rs index ccbdbda..c22daaa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,7 +82,7 @@ mod transparent; pub use transparent::*; #[cfg(feature = "derive")] -pub use bytemuck_derive::{Zeroable, Pod, TransparentWrapper, Contiguous}; +pub use bytemuck_derive::{Contiguous, Pod, Transparen...
1
15
7
b05354dc01dfbb05cd63aaa088646d2428c85c2f
Lokathor
2021-01-13T23:53:04
(cargo-release) start next development iteration 1.5.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index d7b9e90..f403286 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.5.0" +version = "1.5.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
e1e5ebda61d3ef5ee25e7126870ecf2a354a20d2
Lokathor
2021-01-13T23:52:46
(cargo-release) version 1.5.0
diff --git a/Cargo.toml b/Cargo.toml index 2347b6d..d7b9e90 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.4.2-alpha.0" +version = "1.5.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
df53958735dbe39213141ac6949cc0168b46a909
Lokathor
2020-11-27T16:33:20
(cargo-release) start next development iteration 1.0.2-alpha.0
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index df14a45..1f9825b 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.0.1" +version = "1.0.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"...
1
1
1
1cf639571b3b121ef57b7b2d02e1f2b16d6582bf
Lokathor
2020-11-27T16:32:36
(cargo-release) version 1.0.1
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index ff8286b..df14a45 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.0.1-alpha.0" +version = "1.0.1" authors = ["Lokathor <zefria@gmail.com>"...
1
1
1
094f76ad735a7ff8fd338d7644a6e9919ba9b18e
Lokathor
2020-10-21T20:21:43
Closes https://github.com/Lokathor/bytemuck/issues/39 On older compilers, you need to say `extern crate proc_macro;` even in 2018 edition. Since it doesn't hurt in newer compilers, we'll just do that.
diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 05daf0b..924270a 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -1,5 +1,7 @@ //! Derive macros for [bytemuck](https://docs.rs/bytemuck) traits. +extern crate proc_macro; + mod traits; use proc_macro2::TokenStream;
1
2
0
b264926ac0657b2aa04053c541a462aa5d4a1d03
Yanchi Toth
2020-10-21T20:11:30
Emit padding-asserting code that doesn't trigger clippy::identity_op (#45)
diff --git a/derive/src/traits.rs b/derive/src/traits.rs index dd425dc..0314791 100644 --- a/derive/src/traits.rs +++ b/derive/src/traits.rs @@ -213,9 +213,16 @@ fn generate_assert_no_padding( let span = input.ident.span(); let fields = get_struct_fields(input)?; - let field_types = get_field_types(&fields); -...
1
10
3
92ce415317d9085611c4b2d12d46a322e25b05b3
Marvin Löbel
2020-10-21T20:11:09
Prevent `try_zeroed_box<T>()` from reserving `size_of<T>()` space on the stack. (#43) * Add test * Change try_zeroed_box implementation to not allocate space for T on the stack * Add second test
diff --git a/src/allocation.rs b/src/allocation.rs index 06d62fa..07de49f 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -11,6 +11,7 @@ use alloc::{ boxed::Box, vec::Vec, }; +use core::convert::TryInto; /// As [`try_cast_box`](try_cast_box), but unwraps for you. #[inline] @@ -55,7 +56,20 @@ pub fn...
2
31
1
78b36f2be5a809856703ec039f90c33893c6d0dc
Lokathor
2020-09-08T21:15:00
(cargo-release) start next development iteration 1.4.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 0de244c..2347b6d 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.4.1" +version = "1.4.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
68ed5fe6f21d1b0bbdb0b15abcb42e9a094c36ac
Lokathor
2020-09-08T21:14:52
(cargo-release) version 1.4.1
diff --git a/Cargo.toml b/Cargo.toml index aeadca2..0de244c 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.4.1-alpha.0" +version = "1.4.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
343c618fea24089a8644b984d4e5ac2bc6917290
Thom Chiovoloni
2020-09-05T18:33:29
Mark playground as all-features (#37)
diff --git a/Cargo.toml b/Cargo.toml index 08c345a..aeadca2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,3 +25,6 @@ bytemuck_derive = { version = "1", optional = true } [package.metadata.docs.rs] all-features = true + +[package.metadata.playground] +all-features = true
1
3
0
b816a1b585dab6fb64df10920635a03ce3d6ff91
Lokathor
2020-08-28T03:43:33
(cargo-release) start next development iteration 1.4.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 58ba777..08c345a 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.4.0" +version = "1.4.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
426df7c9c068bd71938b13f09f0468c4541bd6f1
Lokathor
2020-08-28T03:43:25
(cargo-release) version 1.4.0
diff --git a/Cargo.toml b/Cargo.toml index ba6fd89..58ba777 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.4.0-alpha.0" +version = "1.4.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
6632bcef2cc6fdfb89034743da97ffa5d2b3cb3a
Lokathor
2020-08-28T03:39:14
Update Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index ffc8452..ba6fd89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,9 @@ zeroable_maybe_uninit = [] derive = ["bytemuck_derive"] [dependencies] -bytemuck_derive = { version = "1", path = "derive", optional = true } +# use the upper line for testing against bytemuck_deri...
1
3
1
09ab956beae86ea0b1cf83cfbf3b1d24153d8ae6
Lokathor
2020-08-28T03:37:08
update the optional derives to the released version
diff --git a/Cargo.toml b/Cargo.toml index 8407369..ffc8452 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ zeroable_maybe_uninit = [] derive = ["bytemuck_derive"] [dependencies] -bytemuck_derive = { version = "1.0.0-alpha.2", path = "derive", optional = true } +bytemuck_derive = { version = "1", path = ...
1
1
1
c171ac4f5bb5f0946683f68b329cd1caf65708c1
Lokathor
2020-08-28T03:34:05
(cargo-release) start next development iteration 1.0.1-alpha.0
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index e29e24c..ff8286b 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.0.0" +version = "1.0.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"...
1
1
1
9aedc156a8e27b99ade4cbe3bed9eae9a42ae864
Lokathor
2020-08-28T03:33:46
(cargo-release) version 1.0.0
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 7b09551..e29e24c 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.0.0-alpha.3" +version = "1.0.0" authors = ["Lokathor <zefria@gmail.com>"...
1
1
1
a6418a963d5c960f74f7b741787b3a81fba5bad6
Lokathor
2020-08-28T03:27:48
clarify versions.
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 2a40a3c..7b09551 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -15,9 +15,9 @@ name = "bytemuck_derive" proc-macro = true [dependencies] -syn = "1.0" -quote = "1.0" -proc-macro2 = "1.0" +syn = "1" +quote = "1" +proc-macro2 = "1" [dev-dependencie...
1
3
3
19e61623d7418517d05bdb2f6f82a77b9770c694
Lucien Greathouse
2020-08-24T02:12:47
Blame struct name, better error for padding (#35)
diff --git a/derive/src/traits.rs b/derive/src/traits.rs index 91296b8..dd425dc 100644 --- a/derive/src/traits.rs +++ b/derive/src/traits.rs @@ -210,17 +210,16 @@ fn generate_assert_no_padding( input: &DeriveInput, ) -> Result<TokenStream, &'static str> { let struct_type = &input.ident; - let span = input.span(...
1
3
4
24b71e078f39690548d29c1a9b3b3dceb22ec706
Robin Appelman
2020-08-21T22:08:34
add derive macro for Contiguous (#31)
diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 041f68b..7208ac3 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -6,7 +6,7 @@ use proc_macro2::TokenStream; use quote::quote; use syn::{parse_macro_input, DeriveInput}; -use crate::traits::{Derivable, Pod, TransparentWrapper, Zeroable}; +use crate::...
4
180
8
e202fa27566d709e86e9ee26df65c50a6634621c
Lokathor
2020-08-21T21:27:04
(cargo-release) version 1.0.0-alpha.3
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 0079417..2a40a3c 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.0.0-alpha.2" +version = "1.0.0-alpha.3" authors = ["Lokathor <zefria@gma...
1
1
1
550dc3396ced26634f84a408068468c58aef01a1
Lucien Greathouse
2020-08-21T21:13:55
Fix Pod derive to use explicit absolute path to 'core' (#32)
diff --git a/derive/src/traits.rs b/derive/src/traits.rs index 5eb86ee..3167ed2 100644 --- a/derive/src/traits.rs +++ b/derive/src/traits.rs @@ -150,12 +150,12 @@ fn generate_assert_no_padding( let field_types = get_field_types(&fields); let struct_size = - quote_spanned!(span => core::mem::size_of::<#struct...
1
3
3
ef32c088a209f08e5b33039dbebc45aa38e18837
Lokathor
2020-08-21T02:28:54
docs typo
diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 041f68b..3d6ee5e 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -78,7 +78,7 @@ pub fn derive_zeroable( /// /// The following constraints need to be satisfied for the macro to succeed /// -/// - The struct must be `#[repr(transparent)] +/// - The str...
1
1
1
5d7c6cacfe8325d613f99b31a86b778c067f5a04
Lokathor
2020-08-21T01:49:23
use pre-release in CI for now.
diff --git a/Cargo.toml b/Cargo.toml index f792c65..8407369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ zeroable_maybe_uninit = [] derive = ["bytemuck_derive"] [dependencies] -bytemuck_derive = { version = "1.0", path = "derive", optional = true } +bytemuck_derive = { version = "1.0.0-alpha.2", path ...
1
1
1
14fa8650f0e4bb739bb737cd9eae19add37952bb
Lokathor
2020-08-21T01:46:44
(cargo-release) version 1.0.0-alpha.2
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 32afdb4..0079417 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.0.0-alpha.1" +version = "1.0.0-alpha.2" authors = ["Lokathor <zefria@gma...
1
1
1
044c1c3057f69d404b98422703fa1dd12b571d9c
Lokathor
2020-08-21T01:41:51
(cargo-release) version 1.0.0-alpha.1
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 86a1c74..32afdb4 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.0.0-alpha.0" +version = "1.0.0-alpha.1" authors = ["Lokathor <zefria@gma...
1
1
1
88c6f08213843a3bbefba9e3da3b4c6844fd86cf
Lokathor
2020-08-21T01:39:00
next version adds a feature, so it's a minor bump.
diff --git a/Cargo.toml b/Cargo.toml index 3fc2ef1..f792c65 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.3.2-alpha.0" +version = "1.4.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository...
1
1
3
87e48ba1d95938cb3daab53f46aff8bcc775445c
Lokathor
2020-08-21T01:37:56
ready bytemuck_derive for an alpha publish.
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index e40821f..86a1c74 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.0.0" +version = "1.0.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"...
1
2
2
a64f697cd5b3b6d813740f86932d268b768d2725
Lokathor
2020-08-21T01:05:59
give the derives crate a better description.
diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 251615f..e40821f 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bytemuck_derive" -description = "A crate for mucking around with piles of bytes." +description = "derive proc-macros for `bytemuck`" version = "1.0.0" au...
1
1
1
cf944452b78054bc33eb6e795565fd60020f8a3c
Robin Appelman
2020-08-21T01:04:36
add basic derive macro for Pod, Zeroable and TransparentWrapper for structs (#30) * add basic derive macro for Pod and Zeroable for structs * add derive macro for TransparentWrapper * use core::mem::size_of instead of std::mem::size_of in generated code * cleanup error handling a bit * remove unneeded iter...
diff --git a/Cargo.toml b/Cargo.toml index e768b61..3fc2ef1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,12 @@ exclude = ["/pedantic.bat"] extern_crate_alloc = [] extern_crate_std = ["extern_crate_alloc"] zeroable_maybe_uninit = [] +derive = ["bytemuck_derive"] + +[dependencies] +bytemuck_derive = { version...
7
434
0
4d819357ba0679d0f1650c0c2c8cd4d3d9e97dac
Lokathor
2020-08-20T03:43:44
opt-in zeroable for maybe_unint
diff --git a/Cargo.toml b/Cargo.toml index 79ac2a8..e768b61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ exclude = ["/pedantic.bat"] # Note: Yeah these names are non-standard, we'll fix it in v2 some day maybe extern_crate_alloc = [] extern_crate_std = ["extern_crate_alloc"] +zeroable_maybe_uninit = []...
2
3
2
6414f14815693907f5dc09bf57d869f88e815782
Lokathor
2020-08-18T23:02:06
Use `transmute_copy` where appropriate. Format some docs.
diff --git a/src/lib.rs b/src/lib.rs index fe450db..90455e0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -223,20 +223,13 @@ impl std::error::Error for PodCastError {} /// /// ## Panics /// -/// This is [`try_cast`] but will panic on error. +/// * This is like [`try_cast`](try_cast), but will panic on a size mismatch....
1
12
20
46939d28b766e351c6c960153dc8a9a831efe32b
Lokathor
2020-07-25T22:06:06
(cargo-release) start next development iteration 1.3.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 4b8d614..79ac2a8 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.3.1" +version = "1.3.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
07c5193565aac2a7a7bdacdde7c493bf3e509c25
Lokathor
2020-07-25T22:05:55
(cargo-release) version 1.3.1
diff --git a/Cargo.toml b/Cargo.toml index adacb0c..4b8d614 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.3.1-alpha.0" +version = "1.3.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
436abe3e89818ae1acb989b1312fdaae5558c86d
Lokathor
2020-07-25T21:53:27
convert to resize_with
diff --git a/src/allocation.rs b/src/allocation.rs index 7930c32..06d62fa 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -91,7 +91,7 @@ pub fn try_zeroed_slice_box<T: Zeroable>( if size_of::<T>() == 0 { // This will not allocate but simple create a dangling slice pointer. let mut vec = Vec::with...
1
1
1
a2baf0abb37b9f4f30772e02907365caae161f90
Lokathor
2020-07-25T21:50:10
use the correct (weaker) trait bound.
diff --git a/src/allocation.rs b/src/allocation.rs index 1e33796..7930c32 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -85,7 +85,9 @@ pub fn zeroed_box<T: Zeroable>() -> Box<T> { /// /// This fails if the allocation fails. #[inline] -pub fn try_zeroed_slice_box<T: Pod>(length: usize) -> Result<Box<[T]>,...
1
4
2
52be254e2c0b0dd2889bd6ff41a279e29294710e
Soveu
2020-07-25T21:26:28
zeroed_slice_box returns Result (#28) It returns `Result<(), Box>` instead of `Box` `cargo check` catched it How did it pass CI?
diff --git a/src/allocation.rs b/src/allocation.rs index cec5455..6b116e5 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -111,7 +111,7 @@ pub fn try_zeroed_slice_box<T: Pod>(length: usize) -> Result<Box<[T]>, ()> { } /// As [`try_zeroed_slice_box`](try_zeroed_slice_box), but unwraps for you. -pub fn zero...
1
1
1
bb2b95643e8147e4fcc76eb65e27af099a1d6e14
Lokathor
2020-07-25T02:44:29
(cargo-release) version 1.3.0
diff --git a/Cargo.toml b/Cargo.toml index 4366e22..db9aba3 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.3.0-alpha.0" +version = "1.3.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
4f2a822cb691ba18a748aea31f6bb6bc36eb7a09
Lokathor
2020-07-25T02:41:57
Correct the error variant returned in some situations.
diff --git a/src/lib.rs b/src/lib.rs index f21c0b2..fe450db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,7 +164,7 @@ pub fn try_from_bytes<T: Pod>(s: &[u8]) -> Result<&T, PodCastError> { if s.len() != size_of::<T>() { Err(PodCastError::SizeMismatch) } else if (s.as_ptr() as usize) % align_of::<T>() != 0 ...
1
6
2
51f1121d4f40d7d5efe9807878d768bc28b46235
Lokathor
2020-07-25T02:34:32
Add `zeroed_slice_box`
diff --git a/src/allocation.rs b/src/allocation.rs index 57fb232..cec5455 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -110,6 +110,11 @@ pub fn try_zeroed_slice_box<T: Pod>(length: usize) -> Result<Box<[T]>, ()> { } } +/// As [`try_zeroed_slice_box`](try_zeroed_slice_box), but unwraps for you. +pub f...
1
5
0
b531b050f335817d3be42bc51c9e4bb52377720f
Lokathor
2020-07-24T12:57:41
Part of https://github.com/Lokathor/bytemuck/issues/21
diff --git a/src/transparent.rs b/src/transparent.rs index b77a870..fa6d479 100644 --- a/src/transparent.rs +++ b/src/transparent.rs @@ -22,8 +22,8 @@ use super::*; /// /// 3. The `Wrapper` may not impose additional alignment requirements over /// `Wrapped`. -/// - Note: this is currently guaranteed by repr(t...
1
4
2
c507a6a8a7ccfc31ed7c5ba9c73bf20f16472247
Lokathor
2020-07-24T02:23:46
add additional license options
diff --git a/Cargo.toml b/Cargo.toml index 94a75a6..0aa5a0c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "bytemuck" description = "A crate for mucking around with piles of bytes." -version = "1.3.1-alpha.0" +version = "1.3.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] reposito...
1
2
2
c9a387a8da8d1fff53a93419fb3c7cfc60086523
Lokathor
2020-07-24T02:21:09
update offset_of to have 2-arg and 3-arg versions.
diff --git a/src/offset_of.rs b/src/offset_of.rs index fa85727..fdaba20 100644 --- a/src/offset_of.rs +++ b/src/offset_of.rs @@ -1,89 +1,68 @@ #![forbid(unsafe_code)] -/// Find the offset in bytes of the given `$field` of `$Type`, using `$instance` -/// as an already-initialized value to work with. +/// Find the off...
2
113
72
11e791c88ada3f2c3ff166d5b670d4ad985466ab
Andreas Molzer
2020-01-10T22:34:25
Add a method to allocate zeroed slices Note that the method requires a Pod and not only a Zeroable structure since only the latter guarantees that slices have a consistent layout. We need to compute this layout to manually allocate it.
diff --git a/src/allocation.rs b/src/allocation.rs index 0676f3f..57fb232 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -72,6 +72,44 @@ pub fn zeroed_box<T: Zeroable>() -> Box<T> { try_zeroed_box().unwrap() } +/// Allocates a `Box<[T]>` with all contents being zeroed out. +/// +/// This uses the globa...
1
38
0
83ee985942b72855c27039ea107842560de22f12
Igor Gnatenko
2020-02-17T10:01:13
chore: Exclude unneeded files
diff --git a/Cargo.toml b/Cargo.toml index 35a68e6..79e6894 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ keywords = ["transmute", "bytes", "casting"] categories = ["encoding", "no-std"] edition = "2018" license = "Zlib" +exclude = ["/scripts/*", "/.travis.yml", "/appveyor.yml", "/bors.toml", "/pedantic.b...
1
1
0
9fa2759bd2027519c0fcb571b591a0b007aebb93
Lokathor
2020-02-07T03:45:35
(cargo-release) start next development iteration 1.2.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 511a786..35a68e6 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.2.0" +version = "1.2.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
2725633356818ea7cb1a1336fde2aa62eb061315
Lokathor
2020-02-07T03:44:50
(cargo-release) version 1.2.0
diff --git a/Cargo.toml b/Cargo.toml index 6a410b7..511a786 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.2.0-alpha.1" +version = "1.2.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
fa686336e7b9a2bcba02a40ad17ce3ec6d72ceec
Lokathor
2020-02-07T02:38:05
factor the panic to one spot.
diff --git a/src/lib.rs b/src/lib.rs index 801bacc..a90199d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,16 @@ possibility code branch. */ +/// Immediately panics. +#[cold] +#[inline(never)] +fn something_went_wrong(src: &str, err: PodCastError) -> ! { + // Note(Lokathor): Keeping the panic here makes th...
1
17
7
cd8ed37eae289ab5cc9895d7e7084ef8b53b7724
Lokathor
2020-02-07T02:18:10
Remove the unreachable_unchecked
diff --git a/src/lib.rs b/src/lib.rs index f78d024..801bacc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,13 @@ use core::arch::x86; #[cfg(target_arch = "x86_64")] use core::arch::x86_64; // -use core::{hint::unreachable_unchecked, marker::*, mem::*, num::*, ptr::*}; +use core::{marker::*, mem::*, num::*, pt...
2
182
134
326c78d127eb4885e585315737a8e47c3950ce8e
Lokathor
2020-02-04T07:20:12
formatting
diff --git a/src/lib.rs b/src/lib.rs index dec77d9..f78d024 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,8 +42,7 @@ use core::arch::x86; #[cfg(target_arch = "x86_64")] use core::arch::x86_64; // -use core::{marker::*, mem::*, num::*, ptr::*}; -use core::hint::unreachable_unchecked; +use core::{hint::unreachable_u...
1
1
2
c0c3b38025519ff21f82bda99598b361064a4cac
Lokathor
2020-02-04T07:18:22
eliminate some dead branches
diff --git a/src/lib.rs b/src/lib.rs index 7cfb450..dec77d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,11 +38,12 @@ //! is always built with `extern_crate_alloc` cargo feature enabled. #[cfg(target_arch = "x86")] -pub(crate) use core::arch::x86; +use core::arch::x86; #[cfg(target_arch = "x86_64")] -pub(crat...
1
33
12
d8173e3335a348b355a2e4c65f054b85b4354257
Lokathor
2020-01-29T08:19:24
(cargo-release) version 1.2.0-alpha.1
diff --git a/Cargo.toml b/Cargo.toml index ddd295b..6a410b7 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.2.0-alpha.0" +version = "1.2.0-alpha.1" authors = ["Lokathor <zefria@gmail.com>"] repository...
1
1
1
34284ba9e5790db1fab62be14f03106c44a772da
Lokathor
2020-01-29T08:19:19
version spike
diff --git a/Cargo.toml b/Cargo.toml index 3ffc583..ddd295b 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.1.1-alpha.0" +version = "1.2.0-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository...
1
1
1
f5d5523f77040ca77a5238d4742fc6f00eb9e9ff
Lokathor
2020-01-29T08:08:14
Pod safety documentation change The previous requirements were incorrect because I misunderstood how `repr(packed)` actually means `repr(Rust, packed)` rather than `repr(C, packed)` as I first assumed. Closes https://github.com/Lokathor/bytemuck/issues/14
diff --git a/src/pod.rs b/src/pod.rs index 10d27b4..e5cc693 100644 --- a/src/pod.rs +++ b/src/pod.rs @@ -23,7 +23,9 @@ use super::*; /// middle, and also no `#[repr(C)] struct Foo(u16, u8)`, which has padding on /// the end). /// * The type needs to have all fields also be `Pod`. -/// * The type needs to be `rep...
1
3
1
e415a289661cad8bb3eba0d74efc83c3874ca50b
Thom Chiovoloni
2020-01-11T16:01:58
Duplicate the doctests for the sake of miri
diff --git a/src/transparent.rs b/src/transparent.rs index 0b7fbfb..b77a870 100644 --- a/src/transparent.rs +++ b/src/transparent.rs @@ -98,7 +98,7 @@ pub unsafe trait TransparentWrapper<Wrapped: ?Sized> { // // SAFETY: The unsafe contract requires that these have identical // representations. Usin...
3
152
33
f62e320bba29422a0acae8a7413dbfd218a742b6
Thom Chiovoloni
2020-01-11T15:31:17
Rework TransparentWrapper to not require that the wrapped type be public
diff --git a/src/transparent.rs b/src/transparent.rs index cfa16c6..0b7fbfb 100644 --- a/src/transparent.rs +++ b/src/transparent.rs @@ -3,33 +3,38 @@ use super::*; /// A trait which indicates that a type is a `repr(transparent)` wrapper around /// the `Wrapped` value. /// -/// This allows safely creating references...
1
74
75
c383083c16b9c0a052051f2ee92e81a80588ba1b
Thom Chiovoloni
2020-01-10T19:33:15
Add TransparentWrapper marker trait
diff --git a/src/lib.rs b/src/lib.rs index 88336bc..7cfb450 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,6 +66,9 @@ pub use pod::*; mod contiguous; pub use contiguous::*; +mod transparent; +pub use transparent::*; + // Used from macros to ensure we aren't using some locally defined name and // actually are ref...
2
168
0
d9ca3306ddea2b176a2e04b5002fe9768a75fff1
Thom Chiovoloni
2019-12-12T02:58:14
Add Contiguous trait
diff --git a/src/contiguous.rs b/src/contiguous.rs new file mode 100644 index 0000000..30709a7 --- /dev/null +++ b/src/contiguous.rs @@ -0,0 +1,203 @@ +use super::*; +use core::mem::{size_of, transmute_copy}; + +/// A trait indicating that: +/// +/// 1. A type has an equivalent representation to some known integral typ...
2
206
0
ac3133170a7653c88c2a1b0ab72cf34af683e536
Thom Chiovoloni
2019-12-10T16:30:52
Add a sound offset_of macro
diff --git a/src/lib.rs b/src/lib.rs index eebadc3..35f1de9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,6 +63,12 @@ pub use zeroable::*; mod pod; pub use pod::*; +// Used from macros to ensure we aren't using some locally defined name and +// actually are referencing libcore. This also would allow pre-2018 edit...
1
107
0
23f19609abe50f9bde39c0790a73048b572fa40d
Lokathor
2019-12-06T19:42:21
(cargo-release) start next development iteration 1.1.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 0b2b973..3ffc583 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.1.0" +version = "1.1.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
6d44eadbd2651a0704a8d66afee5d312b80795f2
Lokathor
2019-12-06T19:42:16
(cargo-release) version 1.1.0
diff --git a/Cargo.toml b/Cargo.toml index 5c4d4f3..0b2b973 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.0.2-alpha.0" +version = "1.1.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
93dade1ab17450f3415f4c0a024c796e0b8e5acf
Lokathor
2019-12-06T19:31:51
documentation consistency
diff --git a/src/lib.rs b/src/lib.rs index 4d24305..eebadc3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -290,8 +290,8 @@ pub fn try_cast_mut<A: Pod, B: Pod>(a: &mut A) -> Result<&mut B, PodCastError> { /// isn't aligned. /// * If the target element type is a different size from the current element /// type, and ...
1
2
2
6e54fc51fbdbb94d17e95da1fd5894e0359e1e2a
Simon Sapin
2019-12-06T12:20:07
Add from_bytes, from_bytes_mut, try_from_bytes, try_from_bytes_mut This can be useful when receiving a bytes buffer from I/O
diff --git a/src/lib.rs b/src/lib.rs index a86040b..4d24305 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -81,6 +81,62 @@ pub fn bytes_of_mut<T: Pod>(t: &mut T) -> &mut [u8] { try_cast_slice_mut::<T, u8>(core::slice::from_mut(t)).unwrap_or(&mut []) } +/// Re-interprets `&[u8]` as `&T`. +/// +/// ## Panics +/// +///...
1
56
0
c83aa67f4a96cdff6a1f5e5695f99ce374dcd00d
Lokathor
2019-11-26T21:36:43
(cargo-release) start next development iteration 1.0.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 267c10c..5c4d4f3 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.0.1" +version = "1.0.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
f44e0cde328aff431f3e0c8e3336ba255c788e6d
Lokathor
2019-11-26T21:36:39
(cargo-release) version 1.0.1
diff --git a/Cargo.toml b/Cargo.toml index 0f9fd30..267c10c 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.0.1-alpha.0" +version = "1.0.1" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
91aeef0b45f5a2e7e1c12a462498c81f08531b7b
Lokathor
2019-11-26T02:09:26
much more docs.
diff --git a/src/allocation.rs b/src/allocation.rs index 2c92dce..0676f3f 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -1,7 +1,7 @@ //! Stuff to boost things in the `alloc` crate. //! -//! You must use the crate with the `extern_crate_alloc` feature for the content -//! in this module to be compiled in! ...
4
53
8
33b64ac430805cb6ee9379f6c9e80ee03b49790d
Lokathor
2019-11-19T04:10:44
(cargo-release) start next development iteration 1.0.1-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 505a6bc..59c3d0d 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.0.0" +version = "1.0.1-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
1bd6144acf7b16df48f245af3b3e0af4b8c2b330
Lokathor
2019-11-19T04:10:39
(cargo-release) version 1.0.0
diff --git a/Cargo.toml b/Cargo.toml index 141883d..505a6bc 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 = "0.1.3-alpha.0" +version = "1.0.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
efc80f1c4d609d589bcf42f91b8ed17b1991d161
Lokathor
2019-11-19T03:39:07
Update allocation.rs
diff --git a/src/allocation.rs b/src/allocation.rs index 97c2c00..d07fc71 100644 --- a/src/allocation.rs +++ b/src/allocation.rs @@ -104,13 +104,10 @@ pub fn try_cast_vec<A: Pod, B: Pod>(input: Vec<A>) -> Result<Vec<B>, (PodCastErr let capacity: usize = input.capacity(); // Note(Lokathor): Next we "pre-forget...
1
3
6
c03199ed0d0a04a3fb539d7400471e3014fb28ca
Lokathor
2019-11-11T06:42:52
(cargo-release) start next development iteration 0.1.3-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index b6491cf..141883d 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 = "0.1.2" +version = "0.1.3-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
b0fc42a1cd21a4ed50b095be8ff9adec7ec7b9ac
Lokathor
2019-11-11T06:41:50
(cargo-release) version 0.1.2
diff --git a/Cargo.toml b/Cargo.toml index 6112bd9..b6491cf 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 = "0.1.2-alpha.0" +version = "0.1.2" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1
fba68534dc2b5785469d9437d4d980464c1230ea
Lokathor
2019-11-11T06:41:41
more trait!
diff --git a/src/pod.rs b/src/pod.rs index 41859e4..36848c5 100644 --- a/src/pod.rs +++ b/src/pod.rs @@ -60,7 +60,7 @@ unsafe impl<T: Pod> Pod for ManuallyDrop<T> {} impl_unsafe_marker_for_array!( Pod, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29,...
2
2
2
f9edd7a54aebdc2a83355799beece060b33c3369
Lokathor
2019-11-05T02:13:50
(cargo-release) start next development iteration 0.1.2-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 47e709c..6112bd9 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 = "0.1.1" +version = "0.1.2-alpha.0" authors = ["Lokathor <zefria@gmail.com>"] repository = "http...
1
1
1