Skip to content

Compilation times: what about generating code in files instead of using macros? #1729

@frederikhors

Description

@frederikhors

I think you have created one of the most beautiful libraries in Rust (not only for GraphQL). Thanks again!

But there is one thing I don't like: compilation times especially during development.

I thought if instead of using macros you could generate the same code in one or more files (as for example clorinde does) maybe Cargo would have a much easier life in caching between one change and another the code that has not been modified instead of regenerating each time the same code that comes from the macros?

I don't think there is much work needed to do this since the code you generate in the file must be exactly the same as what is already generated now by macros.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions