Skip to main content

Module exports

Module exports 

Source
Expand description

yog publish exports — the -exports crate generated from a mod’s #[yog_export] items.

Structs§

CrateMeta
What the exports crate’s Cargo.toml says.
ExportItem
Item found by the export scanner.

Enums§

ExportKind
What a #[yog_export] item is.

Functions§

cargo_toml
The exports crate’s Cargo.toml.
collect_rs_files
Recursively collect every .rs file under dir, so #[yog_export] items can live in any module/subfolder — not just flat files directly in src/.
collect_uses
Collect the imports a generated exports crate needs.
generate_fn_wrapper
lib_rs
The exports crate’s src/lib.rs: the imports from collect_uses, structs and enums with rkyv derives so consumers get the serialisable types, and an interop wrapper per fn (the same pattern as import!).
scan
Every #[yog_export] item of one source file (inline modules too), read with syn: its exact text — comments, layout — without the #[yog_export] attribute itself. A file that doesn’t parse has none (the build reports it).
strip_derive_attrs
Strip #[derive(...)] lines from a Rust source item to avoid duplicates when the generator adds its own derives.