Commit Graph

21 Commits

Author SHA1 Message Date
Christopher Serr
b97dee7f90
Switch to syn 2.0 (#183)
This upgrades the derives from `syn` 1.0 to `syn` 2.0. While the MSRV
for `syn` 2.0 is not Rust 1.56 which is higher than the MSRV of
`bytemuck`, the derives don't fall under the MSRV policy.
2023-03-21 13:52:18 -06:00
Dirk Stolle
d1655f541b
Fix a few typos (#169) 2023-01-29 16:41:40 -07:00
Lokathor
2bcc0ef6de chore: Release bytemuck_derive version 1.4.0 2023-01-19 17:45:46 -07:00
Lokathor
5c9d81ca1a (cargo-release) version 1.3.0 2022-11-05 15:49:51 -06:00
Lokathor
3f2e91d3a6 (cargo-release) version 1.2.1 2022-08-16 21:01:26 -06:00
Lokathor
f053800ce0 bump bytemuck_derive version with changelog 2022-08-14 09:49:53 -06:00
Lokathor
a053f1d887 derive version bump. 2022-07-18 19:27:55 -06:00
Edward
2864b52591
Fix/syn broken semver (#116)
* fix(derive): syn backwards compatibility

* fix: bump minimum syn version more after tests
2022-07-18 19:25:00 -06:00
Lokathor
73ae1ee89e (cargo-release) version 1.1.0 2022-03-29 23:15:56 -06:00
Gray Olson
b472189ff8
Add NoPadding, AnyBitPattern, and CheckedBitPattern traits (#91)
* add MaybePod and NoPadding traits

* MaybePod and NoPadding derive macros

* fix doctest

* fmt

* fix bad doc link

* move new casting functions into separate modules

* fmt

* fix doctest and derive test

* remove relaxed module, add anybitpattern

* rename MaybePod to CheckedCastFromPod

* rename checked casting functions

* rework CheckedCastFromPod into CheckedBitPattern

* add anybitpattern derive, fix up other derives

* fix doctest

* fix derive trait of bits type

* export AnyBitPattern derive

* export anybitpattern from traits

* actually export derive macro for AnyBitPattern

* make bits struct pub because of type leaking rules

* allow clippy lint in derive

* add copy bound to CheckedBitPattern

* - replace Pod bounds with NoPadding+AnyBitPattern
- add try and panic versions of checked cast functions
- slightly update docs

* fix derive tests

* - adapt the allocation module cast functions as well
- as part of that, make AnyBitPattern a subtrait of Zeroable
- AnyBitPattern derive also derives Zeroable

* @JakobDegen and @zakarumych nits

* superset -> subset on CheckedBitPattern and NoPadding docs

* derive Debug on generated `Bits` structs, which can be useful for debugging failures

* don't derive debug on spirv target arch

* make it work on 1.34

* merge conflicts

* fix erroneous behavior in doctest
2022-03-29 17:01:02 -06:00
Lokathor
df53958735 (cargo-release) start next development iteration 1.0.2-alpha.0 2020-11-27 09:33:20 -07:00
Lokathor
1cf639571b (cargo-release) version 1.0.1 2020-11-27 09:32:36 -07:00
Lokathor
c171ac4f5b (cargo-release) start next development iteration 1.0.1-alpha.0 2020-08-27 21:34:05 -06:00
Lokathor
9aedc156a8 (cargo-release) version 1.0.0 2020-08-27 21:33:46 -06:00
Lokathor
a6418a963d clarify versions. 2020-08-27 21:27:48 -06:00
Lokathor
e202fa2756 (cargo-release) version 1.0.0-alpha.3 2020-08-21 15:27:04 -06:00
Lokathor
14fa8650f0 (cargo-release) version 1.0.0-alpha.2 2020-08-20 19:46:44 -06:00
Lokathor
044c1c3057 (cargo-release) version 1.0.0-alpha.1 2020-08-20 19:41:51 -06:00
Lokathor
87e48ba1d9 ready bytemuck_derive for an alpha publish. 2020-08-20 19:37:56 -06:00
Lokathor
a64f697cd5 give the derives crate a better description. 2020-08-20 19:05:59 -06:00
Robin Appelman
cf944452b7
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 logic

* remove unneeded clone and order impl

* fix generics

* fix doc typo

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>

* remove unneeded lifetime anotation

* use unreachable for already rejected patch

Co-authored-by: Lucien Greathouse <me@lpghatguy.com>
2020-08-20 19:04:36 -06:00