rustdv-macros 0.1.0

Proc macros for rustdv: #[rustdv::test] and #[derive(Component)] (design-doc §6). Zero dependencies: token parsing is hand-written (no syn/quote) per the offline-toolchain constraint.
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 26.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 181.22 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rustdv/rustdv
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • raysalemi

Proc macros (design-doc §6). Two macros only, per the governing principle — a macro is justified only where Python used runtime dynamism Rust lacks:

  • #[rustdv::test] (§6.1): registers the annotated async fn in the link-time test registry (the inventory/linkme technique, hand rolled for ELF: #[link_section] + __start_/__stop_ symbols).
  • #[derive(Component)] (§6.3): generates the ComponentNode traversal over #[component] fields (T, Option<T>, Vec<T>).

Implementation note (STATUS.md): the zero-dependency constraint rules out syn/quote, so parsing walks raw token trees and code generation goes through string formatting + .parse(). Supported grammar is deliberately narrow (plain fns, non-generic structs with named fields); unsupported shapes produce compile errors.