dynpath 0.1.1

An attribute macro to specify a path to a module dynamically.
Documentation

This crate provides a #[dynpath()] macro that can be placed a mod statement and which points the module to a dynamic path.

The macro takes a single parameter which is the name of an environment variable to read the path from, and it appends the module name and .rs extension onto the contents of the variable.

Example

// Turns into `#[path = "whatever/is/in/OUT_DIR/bindings.rs"]`.
#[dynpath("OUT_DIR")]
mod bindings;