Skip to main content

build

Function build 

Source
pub fn build(
    tree: &Path,
    cwd: Option<&str>,
    cmd: Option<&str>,
    bin: &str,
    env: &[(String, String)],
    notes: &mut Vec<String>,
) -> Result<Built, Fail>
Expand description

Build the tree and hand back the binary.

cwd is the project directory inside the tree (the default is the tree root) and governs both the build and the run, so it answers “where is the project in this tree” once. cmd is a shell line, so it can be a script committed beside the code: the recipe then travels with the source while its invocation stays in the box’s config. env is what fdl resolved for it (libtorch, the vendor’s cargo feature, the loader path).