arty_macros 0.6.0

Runtime entry-point macros for Arty.
Documentation

Arty Macros

crate.io docs.rs MSRV CI Coverage License

Entry-point macros for arty.

Enable Arty’s macros feature and use #[arty::main] or #[arty::test]. You do not need to depend on this companion crate directly.

Both attributes start a runtime, pass its worker capabilities to an async function, and shut down when that function returns. The optional workers = N argument starts exactly N async worker threads. Multiple workers share processors when N exceeds available processor capacity; workers = all selects all available processors. Both attributes use one worker by default.

The monitor = enabled and monitor = disabled arguments select the monitoring policy. #[arty::main] defaults to enabled. #[arty::test] defaults to disabled so future monitor activation stays out of ordinary tests. The panic = shutdown and panic = ignore arguments select the runtime panic policy. Both attributes default to shutdown.

The application-facing references are arty::main and arty::test. They contain runnable examples, configuration syntax, and failure conditions.