[package]
edition = "2021"
name = "asbytes"
version = "0.3.0"
authors = ["Kostiantyn Mysnyk <wandalen@obox.systems>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Traits for viewing data as byte slices or consuming data into byte vectors. Relies on bytemuck for POD safety.
"""
homepage = "https://github.com/Wandalen/wTools/tree/master/module/experimental/asbytes"
documentation = "https://docs.rs/asbytes"
readme = "readme.md"
keywords = [
"fundamental",
"general-purpose",
"bytes",
"pod",
"bytemuck",
]
categories = [
"algorithms",
"development-tools",
"data-structures",
]
license = "MIT"
repository = "https://github.com/Wandalen/wTools/tree/master/module/experimental/asbytes"
[package.metadata.docs.rs]
features = ["full"]
all-features = false
[features]
aarch64_simd = ["bytemuck?/aarch64_simd"]
as_bytes = ["dep:bytemuck"]
const_zeroed = ["bytemuck?/const_zeroed"]
default = ["enabled"]
derive = ["bytemuck?/derive"]
enabled = []
extern_crate_alloc = ["bytemuck?/extern_crate_alloc"]
full = [
"enabled",
"as_bytes",
"into_bytes",
"derive",
"must_cast",
]
into_bytes = ["as_bytes"]
min_const_generics = ["bytemuck?/min_const_generics"]
must_cast = ["bytemuck?/must_cast"]
wasm_simd = ["bytemuck?/wasm_simd"]
zeroable_maybe_uninit = ["bytemuck?/zeroable_maybe_uninit"]
[lib]
name = "asbytes"
path = "src/lib.rs"
[[example]]
name = "asbytes_as_bytes_trivial"
path = "examples/asbytes_as_bytes_trivial.rs"
[[example]]
name = "asbytes_into_bytes_trivial"
path = "examples/asbytes_into_bytes_trivial.rs"
[[test]]
name = "tests"
path = "tests/tests.rs"
[dependencies.bytemuck]
version = "1.21.0"
optional = true
[dev-dependencies.bytemuck]
version = "1.21.0"
features = [
"derive",
"extern_crate_alloc",
]
[lints.clippy]
absolute_paths = "allow"
arbitrary_source_item_ordering = "allow"
cast_precision_loss = "allow"
doc_include_without_cfg = "warn"
implicit_return = "allow"
inline_always = "allow"
items_after_statements = "allow"
large_enum_variant = "allow"
missing_docs_in_private_items = "allow"
missing_inline_in_public_items = "allow"
mod_module_files = "allow"
module_name_repetitions = "allow"
pub_use = "allow"
question_mark_used = "allow"
single_call_fn = "allow"
std_instead_of_alloc = "allow"
std_instead_of_core = "warn"
struct_excessive_bools = "allow"
undocumented_unsafe_blocks = "deny"
wildcard_imports = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unsafe-code = "deny"
[lints.rust.future_incompatible]
level = "warn"
priority = -1
[lints.rust.rust_2018_idioms]
level = "warn"
priority = -1
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ['cfg(feature, values("diagnostics_runtime_assertions", "diagnostics_compiletime_assertions", "diagnostics_memory_layout"))']