diff --git a/Cargo.lock b/Cargo.lock index 14314ff..ca13a4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -216,6 +216,28 @@ dependencies = [ "wasi", ] +[[package]] +name = "git-version" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b0decc02f4636b9ccad390dcbe77b722a77efedfa393caf8379a51d5c61899" +dependencies = [ + "git-version-macro", + "proc-macro-hack", +] + +[[package]] +name = "git-version-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe69f1cbdb6e28af2bac214e943b99ce8a0a06b447d15d3e61161b0423139f3f" +dependencies = [ + "proc-macro-hack", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "hash32" version = "0.2.1" @@ -484,6 +506,12 @@ dependencies = [ "serde", ] +[[package]] +name = "proc-macro-hack" +version = "0.5.20+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" + [[package]] name = "proc-macro2" version = "1.0.49" @@ -676,6 +704,7 @@ dependencies = [ name = "spine" version = "0.1.0" dependencies = [ + "git-version", "postcard", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 2c15d1b..c3f657a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ default-run = "spine" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +git-version = "0.3.5" xdg = "2.4" toml = "0.5" serde_json = "1.0" diff --git a/src/main.rs b/src/main.rs index a92c1db..98a660f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,6 +7,10 @@ use postcard::{to_slice, from_bytes}; use tokio::net::UnixListener; use tracing::{info, error}; +use git_version::git_version; +#[allow(dead_code)] +const GIT_VERSION: &str = git_version!(); + #[tokio::main] async fn main() { let subscriber = tracing_subscriber::fmt::Subscriber::builder()