post_process

Attribute Macro post_process 

Source
#[post_process]
Expand description

Constructs the post-processing callback.

This callback will be called after the source code compilation (and thus after all the procedural macro expansion calls). The post-processing callback is the only function defined by the procedural macro that is allowed to have side effects.

This macro will be called with a list of all auxiliary data emitted by the macro during code expansion.

This data can be used to collect additional information from the source code of a project that is being compiled during the macro execution. For instance, you can create a procedural macro that collects some information stored by the Cairo programmer as attributes in the project source code. This callback will be called after the source code compilation (and thus after all the procedural macro executions). All auxiliary data emitted by the procedural macro during source code compilation will be passed to the callback as an argument.

This macro hides the conversion to stable ABI structs from the user.

If multiple callbacks are defined within the macro, all the implementations will be executed. No guarantees can be made regarding the order of execution.