const_shader_layout 0.4.0

Compile-time checks to ensure structs conform to WGSL's memory layout rules
Documentation
[package]
name = "const_shader_layout"
version = "0.4.0"
edition = "2024"
description = "Compile-time checks to ensure structs conform to WGSL's memory layout rules"
repository = "https://github.com/beicause/const_shader_layout"
license = "MIT OR Apache-2.0"
keywords = ["const", "macro", "shader", "wgsl"]
exclude = [".github"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
no-default-features = true
features = [
  "glam",
  "half",
  "std",
  "derive",
]
rustdoc-args = ["--cfg", "docsrs"]

[workspace]
members = ["derive", "tests"]

[dependencies]
const_shader_layout_derive = {
  path = "derive",
  version = "0.2.0",
  optional = true
}
glam = {
  version = "0.33",
  default-features = false,
  features = ["i16", "i32", "u16", "u32"],
  optional = true
}
half = { version = "2", default-features = false, optional = true }

[features]
default = ["derive", "glam", "std"]

# Enables derive macros `ShaderLayout` and `ShaderLayoutCompat`.
derive = ["dep:const_shader_layout_derive"]

# Implements `ShaderLayout` for `glam`(latest) types. Overrides other `glam_*` features.
glam = ["dep:glam"]

# Implements `ShaderLayout` for `half::f16`.
half = ["dep:half"]

# Reexports `glam`'s `libm` feature.
libm = ["glam?/libm"]

# Reexports `glam`'s `nostd-libm` feature.
nostd-libm = ["glam?/nostd-libm"]

# Reexports `glam`'s `std` feature.
std = ["glam?/std"]

[lints.clippy]
allow_attributes = "warn"
allow_attributes_without_reason = "warn"