11use axum:: Json ;
22use axum:: response:: IntoResponse ;
33use rivet_api_builder:: extract:: Extension ;
4+ use rivet_util:: build_meta;
45use serde_json:: json;
56
67use crate :: ctx:: ApiCtx ;
@@ -11,13 +12,13 @@ pub async fn get_metadata(Extension(ctx): Extension<ApiCtx>) -> impl IntoRespons
1112 ctx. skip_auth ( ) ;
1213
1314 Json ( json ! ( {
14- "runtime" : "engine" ,
15- "version" : env! ( "CARGO_PKG_VERSION" ) ,
16- "git_sha" : env! ( "VERGEN_GIT_SHA" ) ,
17- "build_timestamp" : env! ( "VERGEN_BUILD_TIMESTAMP" ) ,
18- "rustc_version" : env! ( "VERGEN_RUSTC_SEMVER" ) ,
19- "rustc_host" : env! ( "VERGEN_RUSTC_HOST_TRIPLE" ) ,
20- "cargo_target" : env! ( "VERGEN_CARGO_TARGET_TRIPLE" ) ,
21- "cargo_profile" : if env! ( "VERGEN_CARGO_DEBUG" ) == "true" { "debug" } else { "release" }
15+ "runtime" : build_meta :: RUNTIME ,
16+ "version" : build_meta :: VERSION ,
17+ "git_sha" : build_meta :: GIT_SHA ,
18+ "build_timestamp" : build_meta :: BUILD_TIMESTAMP ,
19+ "rustc_version" : build_meta :: RUSTC_VERSION ,
20+ "rustc_host" : build_meta :: RUSTC_HOST ,
21+ "cargo_target" : build_meta :: CARGO_TARGET ,
22+ "cargo_profile" : build_meta :: cargo_profile ( )
2223 } ) )
2324}
0 commit comments