ecore-macro 0.10.0

Procedural macros for ecore: bitfield structs/enums, enum maps, and ranged integers
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 76.47 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 538.66 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • pbl-pw/ecore
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pbl-pw

ecore-macro

crates.io docs.rs

Procedural macros for the ecore crate.

Macros

Macro Description
#[derive(MapEnum)] Generate enum-to-array mapping with optional discriminant enum
#[bitfld(...)] Attribute macro for defining bitfield structs and enums
map_enum! Const-friendly enum variant → value mapping
rint! Compile-time ranged integer type generator
#[derive(BitsCast)] Derive bit-level casting between representations
#[derive(IterEnumDiscriminants)] Derive iteration over enum discriminants

Usage

Add to Cargo.toml:

[dependencies]
ecore = "0.10"
ecore-macro = "0.10"

Nightly: const trait impls

Enable the const-trait feature to generate const fn trait implementations (requires nightly Rust with #![feature(const_trait_impl)]):

ecore-macro = { version = "0.10", features = ["const-trait"] }

MSRV

Rust 1.87+

License

MIT — see repository for full license.