Skip to main content

compile_schemas

Function compile_schemas 

Source
pub fn compile_schemas(
    schema_dir: &Path,
    out_dir: &Path,
    import_paths: &[&Path],
    names: &[&str],
)
Expand description

Compile Cap’n Proto schemas with CGR + metadata extraction.

For each schema name, compiles {schema_dir}/{name}.capnp via capnpc, saves the raw CGR to {out_dir}/{name}.cgr, and extracts annotation metadata to {out_dir}/{name}_metadata.json.

import_paths are passed to capnpc for resolving using import directives.