Skip to content

Add rust_plugin rule to support Rust compiler plugins #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidzchen opened this issue Feb 23, 2017 · 3 comments
Closed

Add rust_plugin rule to support Rust compiler plugins #40

davidzchen opened this issue Feb 23, 2017 · 3 comments

Comments

@davidzchen
Copy link
Member

Add support for using Rust compiler plugins.

Because plugins are an unstable feature, #14 would also make this easier to use for developers.

@acmcarther
Copy link
Collaborator

Does this issue also track proc-macro dependencies? Those have been stabilized (as of 1.15 IIRC).

Based off of rustc --version and https://github.com/rust-lang/rfcs/blob/master/text/1566-proc-macros.md, I think they're basically just another kind of rust_library, and can be specified with --crate-type. We'll need special handling if one of these is received as a dependency though.

@acmcarther
Copy link
Collaborator

Update on this:

This is actually supported trivially, and rustc links these identically to any other kind of dependency. Support for general crate types (#38 extended with "proc-macro" mapping to rlib, blocked on me), is all that is necessary.

@acmcarther
Copy link
Collaborator

This issue is obsolete:

As detailed in the prior comment, no special rule variant is required to support compiler plugins -- just a crate type. Likewise, compiler plugins can be included directly as normal dependencies and used (e.g. for custom derive).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants