5 stable releases
new 1.0.4 | Dec 6, 2024 |
---|---|
1.0.1 | Dec 5, 2024 |
#19 in Procedural macros
350 downloads per month
34KB
752 lines
dylo-runtime
dylo-runtime
generates the consumer crates corresponding to module implementation crates marked with #[dylo::export]
attributes. This tool scans the workspace for crates starting with mod-
and generates corresponding con-
crates that contain just the trait definitions and public interfaces.
Installation
cargo install dylo-runtime
Note that dylo-runtime needs rustfmt
to be present at runtime.
Usage
The CLI expects to be run from the root of a Cargo workspace containing mod crates. It will:
- Find all crates prefixed with
mod-
- Generate corresponding
con-
crates with trait definitions - Add spec files to the original mod crates
- Verify compilation of generated consumer crates
Basic usage:
con
Options:
--force
: Force regeneration of all consumer crates--mod <NAME>
: Only process the specified mod-h, --help
: Print help information
By default, changes are only made if the source mod crates have been modified more recently than their generated consumer crates.
con annotations, exporting interfaces etc.
For how to write con-friendly code, see the documentation of the con crate
Dependencies
~3–10MB
~106K SLoC