AFL support for Rust is in fact better than that for gcc because Rust at least provides a plugin interface that doesn't require you to have its sources lying around -- the GCC support instruments the assembly instead of compiler IR, which is far less effective. Rust nightly at least has proper afl support, gcc doesn't.
It works for clang because llvm plugins in clang are stable, but we could get there easily -- in fact stabilizing something akin to `-Xclang` is probably something that could be done in Rust today without issue.
A stable version of afl-rs could exist that does the same thing gcc does, as I mentioned below.
As far as compiler tools are concerned, I'm mostly okay with stuff being nightly-only. These dependencies do not pollute the dependency graph and are something you only deal with locally.
How come can I advocate Rust to serious enterprise customers, if I have to justify using nightlies to make use of such tooling?
Apparently downvoting every time someone mentions the issue with nightly being required is fair.
Examples? Examples that aren't tools, that is. The main example I can think of is serde, and that works on stable (just works better on nightly).
What's wrong with nightly for using tooling? You don't have to keep updating, you can pin to a nightly from a particular date. You can use rustup.rs to switch to stable locally if you need to.
I said it's unfair, because gcc has worse issues here, and everyone probably agrees that gcc is "enterprise ready".
Usually it is set in stone and only updated every few IT upgrade cycles.
What the devs get on their machines is that and nothing more.
GCC is in that respect "enterprise ready" because it very likely was installed on the system already. And probably not the latest version either.
> Note: You must be using nightly Rust release. If you're using multirust, which is highly recommended, switch with multirust default nightly command.
I guess the idea is to dissuade people from using hacks to enable unstable features -- this will break things which depend on the library. If a library compiles on stable, it should never break due to a compiler upgrade.
(Tooling doesn't have this problem, it doesn't come into play when it's used on a dependency)
afl.rs uses a Rust compiler plugin to register the LLVM pass needed to instrument Rust programs so that AFL can run on them:
https://github.com/frewsxcv/afl.rs/blob/master/afl-plugin/li...
Compiler plugins in Rust are currently unstable, and as far as I know, are not on a path to stability in the near-term.