Skip to content

Commit

Permalink
add vergen dependency and build.rs build script
Browse files Browse the repository at this point in the history
supports setting compile-time environment data for verbose debug version reporting
  • Loading branch information
chrissimpkins committed Nov 21, 2023
1 parent 151d75b commit efe60bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fontc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "fontc"
version = "0.0.1"
build = "build.rs"
edition = "2021"
license = "MIT/Apache-2.0"
description = "A compiler for fonts."
Expand Down Expand Up @@ -48,3 +49,6 @@ pretty_assertions.workspace = true
skrifa.workspace = true
kurbo.workspace = true
chrono.workspace = true

[build-dependencies]
vergen = { version = "8.0.0", features = ["build", "cargo", "git", "gitcl", "rustc"] }
14 changes: 14 additions & 0 deletions fontc/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use std::error::Error;
use vergen::EmitBuilder;

fn main() -> Result<(), Box<dyn Error>> {
// Emit the instructions
EmitBuilder::builder()
.quiet()
.idempotent()
.all_cargo()
.all_git()
.all_rustc()
.emit()?;
Ok(())
}

0 comments on commit efe60bb

Please sign in to comment.