diff --git a/build.rs b/build.rs index ed2d657..b94570e 100644 --- a/build.rs +++ b/build.rs @@ -31,6 +31,7 @@ fn main() -> std::io::Result<()> { } } + println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap()); println!("cargo:rerun-if-env-changed={ENV_KEY}"); Ok(()) diff --git a/src/api.rs b/src/api.rs index 020469a..adc3643 100644 --- a/src/api.rs +++ b/src/api.rs @@ -95,7 +95,12 @@ fn get_username() -> String { } fn build_user_agent() -> String { - let ua = concat!("asciinema/", env!("CARGO_PKG_VERSION")); // TODO add more system info + let ua = concat!( + "asciinema/", + env!("CARGO_PKG_VERSION"), + " target/", + env!("TARGET") + ); ua.to_owned() }