1 Plugin `..` only found in rlib format, but must be available in dylib format.
3 Erroronous code example:
6 ```ignore (needs-linkage-with-other-tests)
7 #![crate_type = "rlib"]
8 #![feature(rustc_private)]
10 extern crate rustc_middle;
11 extern crate rustc_driver;
13 use rustc_driver::plugin::Registry;
16 fn __rustc_plugin_registrar(_: &mut Registry) {}
20 ```ignore (needs-linkage-with-other-tests)
22 #![plugin(rlib_plugin)] // error: plugin `rlib_plugin` only found in rlib
23 // format, but must be available in dylib
28 The compiler exposes a plugin interface to allow altering the compile process
29 (adding lints, etc). Plugins must be defined in their own crates (similar to
30 [proc-macro](../reference/procedural-macros.html) isolation) and then compiled
31 and linked to another crate. Plugin crates *must* be compiled to the
32 dynamically-linked dylib format, and not the statically-linked rlib format.
33 Learn more about different output types in
34 [this section](../reference/linkage.html) of the Rust reference.
36 This error is easily fixed by recompiling the plugin crate in the dylib format.