[package]
edition = "2024"
name = "derive_dst"
version = "0.1.2"
authors = ["Mike Foster <https://github.com/MusicalNinjaDad>"]
build = false
exclude = [
".github",
".devcontainer",
".vibe",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Derive macro for DST structs: generates a private `UninitFoo` MaybeUninit mirror, safe allocation constructors (`new_uninit_for_size` / `new_uninit_for_count` returning the box with its `Layout`, tail offset & count), an unsafe `assume_init`, and layout constructors (`layout_for_size` / `layout_for_count`) returning `LayoutError`. Requires nightly."
readme = "README.md"
keywords = [
"derive",
"DST",
"unsized",
"layout",
"ffi",
]
categories = ["development-tools"]
license = "MIT"
repository = "https://github.com/MusicalNinjaDad/derive_dst"
[lib]
name = "derive_dst"
path = "src/lib.rs"
proc-macro = true
[[example]]
name = "devicedetails"
path = "examples/devicedetails.rs"
[[example]]
name = "expanded"
path = "examples/expanded.rs"
[[example]]
name = "usage"
path = "examples/usage.rs"
[[test]]
name = "test_attributes"
path = "tests/test_attributes.rs"
[[test]]
name = "test_compilation"
path = "tests/test_compilation.rs"
[[test]]
name = "test_dst"
path = "tests/test_dst.rs"
[dependencies.proc-macro2]
version = "1.0.106"
[dependencies.proc_macro2_diagnostic]
version = "0.8.1"
[dependencies.quote]
version = "1.0.45"
[dependencies.syn]
version = "3.0.9"
features = [
"full",
"extra-traits",
]
[dev-dependencies.trybuild]
version = "1.0.116"