mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-25 00:02:22 +00:00
b472189ff8
* 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
56 lines
1.6 KiB
TOML
56 lines
1.6 KiB
TOML
[package]
|
|
name = "bytemuck"
|
|
description = "A crate for mucking around with piles of bytes."
|
|
version = "1.8.0"
|
|
authors = ["Lokathor <zefria@gmail.com>"]
|
|
repository = "https://github.com/Lokathor/bytemuck"
|
|
readme = "README.md"
|
|
keywords = ["transmute", "bytes", "casting"]
|
|
categories = ["encoding", "no-std"]
|
|
edition = "2018"
|
|
license = "Zlib OR Apache-2.0 OR MIT"
|
|
exclude = ["/pedantic.bat"]
|
|
|
|
[features]
|
|
# In v2 we'll fix these names to be more "normal".
|
|
derive = ["bytemuck_derive"]
|
|
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.
|
|
aarch64_simd = [] # Until >= 1.59.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 ONLY!
|
|
nightly_portable_simd = []
|
|
|
|
[dependencies]
|
|
# use the upper line for testing against bytemuck_derive changes, if any
|
|
bytemuck_derive = { path = "./derive", optional = true }
|
|
# bytemuck_derive = { version = "1", optional = true }
|
|
|
|
[package.metadata.docs.rs]
|
|
# Note(Lokathor): Don't use all-feautures or it would use `unsound_ptr_pod_impl` too.
|
|
features = [
|
|
"derive",
|
|
"extern_crate_alloc",
|
|
"extern_crate_std",
|
|
"zeroable_maybe_uninit",
|
|
"min_const_generics",
|
|
"wasm_simd",
|
|
]
|
|
|
|
[package.metadata.playground]
|
|
# Note(Lokathor): Don't use all-feautures or it would use `unsound_ptr_pod_impl` too.
|
|
features = [
|
|
"derive",
|
|
"extern_crate_alloc",
|
|
"extern_crate_std",
|
|
"zeroable_maybe_uninit",
|
|
"min_const_generics",
|
|
"wasm_simd",
|
|
]
|