Skip to content

Quote is hard to use for non-procmacro code generation #90

@jsgf

Description

@jsgf

I'm using quote for Thrift in a stand-alone code generator. With quote prior to 0.4 this worked pretty well, but in more recent versions it has become more tightly coupled with proc macros. I've been working around this, but it has become increasingly difficult. Since procmacros became stabilized, it means that my codegen binary now has a dynamic linkage with libproc_macro-*.so which is awkward for an otherwise statically-linked binary.

In the short term, it would be nice if there was also a static libproc_macro for this case, but I think a longer-term solution would be to either make it possible to compile quote independently from proc macros (which isn't really possible with the feature system), or some other crate with a similar API.

I'm not really sure what the practicalities of this are, but I think it would be important to make sure they share any code which depends on changes to the language so they both keep up to date as it evolves without doubling the effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions