bytemuck/Cargo.toml

111 lines
3.3 KiB
TOML
Raw Normal View History

2019-09-20 01:09:31 +00:00
[package]
name = "bytemuck"
description = "A crate for mucking around with piles of bytes."
2024-11-19 17:28:30 +00:00
version = "1.20.0"
2019-09-20 01:09:31 +00:00
authors = ["Lokathor <zefria@gmail.com>"]
repository = "https://github.com/Lokathor/bytemuck"
readme = "README.md"
keywords = ["transmute", "bytes", "casting"]
categories = ["encoding", "no-std"]
edition = "2018"
2020-07-24 02:23:46 +00:00
license = "Zlib OR Apache-2.0 OR MIT"
2020-07-25 21:43:31 +00:00
exclude = ["/pedantic.bat"]
2019-09-20 01:09:31 +00:00
[features]
# In v2 we'll fix these names to be more "normal".
# Enable deriving the various `bytemuck` traits.
derive = ["bytemuck_derive"]
# Enable features requiring items from `extern crate alloc`.
2019-09-20 01:09:31 +00:00
extern_crate_alloc = []
# Enable features requiring items from `extern crate std`.
extern_crate_std = ["extern_crate_alloc"]
# Implement `Zeroable` for `MaybeUninit`.
2020-08-20 03:43:44 +00:00
zeroable_maybe_uninit = []
# Implement `Zeroable` for `std::sync::atomic` types.
zeroable_atomics = []
2023-09-05 20:56:04 +00:00
# All MSRV notes below are GUIDELINES and future versions may require even more
# MSRV on any feature.
# MSRV 1.36: Use `align_offset` method instead of casting to `usize` to check
# alignment of pointers, this *may* improve codegen in some cases (but it has
# never been formally benchmarked!)
align_offset = []
2023-09-05 20:56:04 +00:00
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_cast = [] # MSRV 1.64.0: support the `must` module.
# Adds `TransparentWrapper` impls for stdlib types newer than bytemuck's base MSRV.
# Current MSRV 1.74.0: `core::num::Saturating`.
# MSRV may increase if impls are added for newer types.
transparentwrapper_extra = []
2024-05-13 16:16:20 +00:00
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 **unsound**!!!!
unsound_ptr_pod_impl = []
# MSRV 1.46.0: adds the `#[track_caller]` attribute to functions which may panic
track_caller = []
# Enables all features that are both sound and supported on the latest stable
# version of Rust, with the exception of `extern_crate_alloc` and
# `extern_crate_std`.
# Note: Enabling this feature opts out of any MSRV guarantees!
latest_stable_rust = [
# Keep this list sorted.
"aarch64_simd",
"align_offset",
"alloc_uninit",
"const_zeroed",
"derive",
"min_const_generics",
"must_cast",
"track_caller",
"wasm_simd",
"zeroable_atomics",
"zeroable_maybe_uninit",
]
# ALL FEATURES BELOW THIS ARE NOT SEMVER SUPPORTED! TEMPORARY ONLY!
# Enable support for `std::simd` types.
2024-09-06 01:51:06 +00:00
nightly_portable_simd = []
# Enable support for unstable `std::arch` types (such as the AVX512 types).
2024-09-06 01:51:06 +00:00
nightly_stdsimd = []
# Enable `f16` and `f128`
nightly_float = []
# Improved documentation using the nightly toolchain
nightly_docs = []
[dependencies]
2023-01-20 05:58:28 +00:00
bytemuck_derive = { version = "1.4", path = "derive", optional = true }
2019-09-20 01:09:31 +00:00
[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(target_arch, values("spirv"))'] }
2020-07-25 21:43:31 +00:00
[package.metadata.docs.rs]
2022-07-19 01:25:57 +00:00
# Note(Lokathor): Don't use all-features or it would use `unsound_ptr_pod_impl` too.
features = [
"nightly_docs",
2024-09-06 01:51:06 +00:00
"latest_stable_rust",
"extern_crate_alloc",
"extern_crate_std",
]
2020-09-05 18:33:29 +00:00
[package.metadata.playground]
2022-07-19 01:25:57 +00:00
# Note(Lokathor): Don't use all-features or it would use `unsound_ptr_pod_impl` too.
features = [
2024-09-06 01:51:06 +00:00
"latest_stable_rust",
"extern_crate_alloc",
"extern_crate_std",
]