Expand description
§MPC Macros
This crate provides procedural macros for the async-mpc library:
define_task!- Generates async task implementations with dependency managementTaskGetters- Derives getter functions for task enum variants
§define_task! Macro
The define_task! macro automates the creation of task wrappers, async execution logic,
and dependency management for MPC computations.
§TaskGetters Derive Macro
The TaskGetters derive macro automatically generates try_get_*_task functions for
each variant in a TaskType enum, eliminating repetitive boilerplate code.
For detailed documentation and examples, see the individual implementation modules.
Macros§
- define_
task - Generates async-mpc task implementations with automatic dependency management.
- dump_
protocol_ tags - Macro to dump the current state of the protocol tag registry at compile time (for debugging)
- new_
protocol - Macro to ensure protocol tag uniqueness at compile time. This macro generates a unique tag for a given protocol name, and checks against a registry to prevent collisions. If a collision is detected, it finds the next available tag.
Derive Macros§
- Gate
Methods - Derives
Gate::map_labelsandGate::for_each_label - HasTweakable
Hasher - Procedural macro to automatically implement the
HasTweakableHashertrait for a struct. - Party
- Procedural macro to automatically implement the
Partytrait for a struct. - Peer
- Procedural macro to automatically implement the
Peertrait for a struct. - Probabilistic
- Procedural macro to automatically implement the
Probabilistictrait for a struct. - Scribe
- Procedural macro to automatically implement the
Scribetrait for a struct. - Task
Getters - Derives
try_get_*_taskfunctions for enum variants containing task types.