[package]
name = "asbytes"
version = "0.3.0"
edition = "2021"
authors = [
"Kostiantyn Mysnyk <wandalen@obox.systems>",
]
license = "MIT"
readme = "readme.md"
documentation = "https://docs.rs/asbytes"
repository = "https://github.com/Wandalen/wTools/tree/master/module/experimental/asbytes"
homepage = "https://github.com/Wandalen/wTools/tree/master/module/experimental/asbytes"
description = """
Traits for viewing data as byte slices or consuming data into byte vectors. Relies on bytemuck for POD safety.
"""
categories = [ "algorithms", "development-tools", "data-structures" ]
keywords = [ "fundamental", "general-purpose", "bytes", "pod", "bytemuck" ]
[lints]
workspace = true
[package.metadata.docs.rs]
features = [ "full" ]
all-features = false
[features]
default = [ "enabled" ]
full = [
"enabled",
"as_bytes",
"into_bytes",
"derive",
"must_cast",
]
enabled = []
as_bytes = [ "dep:bytemuck" ]
into_bytes = [ "as_bytes" ]
derive = [ "bytemuck?/derive" ]
extern_crate_alloc = [ "bytemuck?/extern_crate_alloc" ]
zeroable_maybe_uninit = [ "bytemuck?/zeroable_maybe_uninit" ]
wasm_simd = [ "bytemuck?/wasm_simd" ]
aarch64_simd = [ "bytemuck?/aarch64_simd" ]
min_const_generics = [ "bytemuck?/min_const_generics" ]
must_cast = [ "bytemuck?/must_cast" ]
const_zeroed = [ "bytemuck?/const_zeroed" ]
[dependencies]
bytemuck = { workspace = true, optional = true }
[dev-dependencies]
bytemuck = { workspace = true, features = [ "derive", "extern_crate_alloc" ] }