Skip to main content

Crate clap_noun_verb_macros

Crate clap_noun_verb_macros 

Source
Expand description

Procedural macros for clap-noun-verb

This crate provides attribute macros #[noun] and #[verb] for declarative CLI command registration.

§I/O Support (v4.0)

The #verb macro now auto-detects clio::Input and clio::Output types in function parameters and automatically wires them with appropriate clap configuration.

§Compile-Time Error Proofing (Poka-Yoke)

The macro system includes advanced compile-time validation:

  • Gap 1: Forgotten #verb detection
  • Gap 2: Duplicate verb detection
  • Gap 3: Return type must implement Serialize
  • Gap 4: Enhanced attribute syntax validation

Macros§

declare_span
Declare a telemetry span for compile-time validation
span
Instrument a code block with a telemetry span

Attribute Macros§

advertise_capability
Advertise a capability to the federated network
arg
Attribute macro for #[arg(…)] on function parameters within #verb functions.
assessment
Define an assessment function with proficiency evaluation
auto_test
Automatically generate tests from semantic combinations
competency
Define a competency dimension with multi-dimensional skill tracking
federated
Mark a CLI as participatory in the federated network
invariant
Runtime validation of invariant properties
learning_path
Define a learning path generator with optimal sequence planning
meta_aware
Attribute macro for generating self-introspecting meta-framework capabilities
milestone
Marks achievement targets with criteria tracking
noun
Attribute macro for registering a noun command
noun_level
Attribute macro for defining nouns at different architectural levels
remote_invoke
Enable remote invocation of a CLI capability
semantic_composable
Mark a function as semantically composable capability
spec
Converts documentation into executable tests with proof generation
verb
Attribute macro for registering a verb command
verb_level
Attribute macro for defining verbs at different architectural levels