rocket_codegen 0.4.0

Procedural macros for the Rocket web framework. failed to build rocket_codegen-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure builds.
If you believe this is' fault, open an issue.
Visit the last successful build: rocket_codegen-0.5.0-rc.2

Rocket - Code Generation

This crate implements the code generation portions of Rocket. This includes custom derives, custom attributes, and procedural macros. The documentation here is purely technical. The code generation facilities are documented thoroughly in the Rocket programming guide.


You should not directly depend on this library. To use the macros, attributes, and derives in this crate, it suffices to depend on rocket in Cargo.toml:

rocket = "0.4.0"

And to import all macros, attributes, and derives via #[macro_use] in the crate root:

#![feature(proc_macro_hygiene, decl_macro)]

#[macro_use] extern crate rocket;
# #[get("/")] fn hello() { }
# fn main() { rocket::ignite().mount("/", routes![hello]); }

Or, alternatively, selectively import from the top-level scope:

#![feature(proc_macro_hygiene, decl_macro)]
# extern crate rocket;

use rocket::{get, routes};
# #[get("/")] fn hello() { }
# fn main() { rocket::ignite().mount("/", routes![hello]); }

Debugging Codegen

When the ROCKET_CODEGEN_DEBUG environment variable is set, this crate logs, at compile-time and to the console, the items it generates. For example, you might run the following to build a Rocket application with codegen debug logging enabled: