Function codegen

Source
pub fn codegen<P>(filename: P) -> Result<(), SubplotError>
where P: AsRef<Path> + Debug,
👎Deprecated since 0.13.0: The subplot-build crate has been replaced by a macro in subplotlib and will not be updated past 0.13 of Subplot
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