Skip to content

Using CodeGeneratorRequest directly #246

@freopen

Description

@freopen

Is there any way to access the CodeGeneratorRequest object from what was generated in the build.rs? What I have in mind is a proc_macro that implements additional traits for generated Reader and Builder structs based on custom annotations in the .capnp file?

If there is no way for that, can I write a simple PR that adds a method to capnpc::CompilerCommand that is similar to file_descriptor_set_path from prost_build to output a serialized CodeGeneratorRequest into the OUT_DIR so I can read it from my proc_macro? Or maybe some different way to access it like returning a CodeGeneratorRequest reader from a separate version of CompilerCommand::run() function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions