modelc 0.1.1

Compile model weight files to standalone executable binaries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn main() {
    println!("cargo:rerun-if-changed=.git/HEAD");

    let sha = std::process::Command::new("git")
        .args(["rev-parse", "--short", "HEAD"])
        .output()
        .ok()
        .filter(|o| o.status.success())
        .map(|o| String::from_utf8_lossy(&o.stdout).trim().to_owned())
        .filter(|s| !s.is_empty())
        .unwrap_or_else(|| "unknown".to_string());

    println!("cargo:rustc-env=MODELC_GIT_SHA={sha}");
}