Function subplot_build::codegen[][src]

pub fn codegen<P>(filename: P) -> Result<()> where
    P: AsRef<Path> + Debug
Expand description

Generate code for one document, inside build.rs.

The output files will be written to the directory specified in the OUT_DIR environment variable. That variable is set by Cargo, when a crate is built.

Also emit instructions for Cargo so it knows to re-run build.rs whenever the input subplot or any of the bindings or functions files it refers to changes. See https://doc.rust-lang.org/cargo/reference/build-scripts.html for details.

use subplot_build::codegen;

codegen("foo.md").ok(); // ignoring error to keep example short