finalfrontier 0.8.0

Train/use word embeddings with subword units
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use git2::{DescribeFormatOptions, DescribeOptions, Repository};

fn main() {
    if let Ok(repo) = Repository::open_from_env() {
        let describe = repo
            .describe(DescribeOptions::new().show_commit_oid_as_fallback(true))
            .expect("Could not get description for git repo.");

        let desc = describe
            .format(Some(DescribeFormatOptions::new().dirty_suffix("-dirty")))
            .expect("Could not format description for git repo.");
        println!(
            "cargo:rustc-env=MAYBE_FINALFRONTIER_GIT_DESC={} {}",
            env!("CARGO_PKG_VERSION"),
            desc
        );
    }
}