Skip to main content

Crate capsec_macro

Crate capsec_macro 

Source
Expand description

§capsec-macro

Procedural macros for the capsec capability-based security system.

Provides attribute macros:

  • requires — declares and validates a function’s capability requirements.
  • deny — marks a function as capability-free for the lint tool.
  • main — injects CapRoot creation into a function entry point.
  • context — generates Has<P> impls and constructor for a capability context struct.

These macros are re-exported by the capsec facade crate. You don’t need to depend on capsec-macro directly.

Attribute Macros§

context
Transforms a struct with permission-type fields into a capability context.
deny
Marks a function as capability-free.
main
Injects CapRoot creation into a function entry point.
permission
Defines a user-defined permission type for capability-based security.
requires
Declares the capability requirements of a function.