Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running compiler plugins on stable

The thing I'm trying to make requires plugin compiler, because I need error reporting at compile time, however I'd like for it to run on Rust stable and not just nightly.

Is there a way to run compiler plugins on stable Rust?

like image 795
Daniel Fath Avatar asked Sep 17 '15 09:09

Daniel Fath


1 Answers

Not yet; compiler plugins rely on an unstable API that is very much in flux. While it's impossible to foretell when the APIs stabilize, I think we'll see a good number of Rust versions before those APIs can be declared stable.

A good workaround for things that only need ASTs is to use syntex and build your own program independent of rustc.

like image 196
llogiq Avatar answered Sep 20 '22 12:09

llogiq