From d7d874f88d4d00204883bf3f773d76d75d0d54f1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 24 Jul 2024 01:06:58 +0000 Subject: [PATCH] start core info module; move version to info Signed-off-by: Jason Volk --- src/core/info/mod.rs | 4 ++++ src/core/{ => info}/version.rs | 13 +++++++------ src/core/mod.rs | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 src/core/info/mod.rs rename src/core/{ => info}/version.rs (75%) diff --git a/src/core/info/mod.rs b/src/core/info/mod.rs new file mode 100644 index 00000000..42ec971e --- /dev/null +++ b/src/core/info/mod.rs @@ -0,0 +1,4 @@ +//! Information about the project. This module contains version, build, system, +//! etc information which can be queried by admins or used by developers. + +pub mod version; diff --git a/src/core/version.rs b/src/core/info/version.rs similarity index 75% rename from src/core/version.rs rename to src/core/info/version.rs index 2876cea8..fb71d4e1 100644 --- a/src/core/version.rs +++ b/src/core/info/version.rs @@ -1,9 +1,10 @@ -/// one true function for returning the conduwuit version with the necessary -/// CONDUWUIT_VERSION_EXTRA env variables used if specified -/// -/// Set the environment variable `CONDUWUIT_VERSION_EXTRA` to any UTF-8 string -/// to include it in parenthesis after the SemVer version. A common value are -/// git commit hashes. +//! one true function for returning the conduwuit version with the necessary +//! CONDUWUIT_VERSION_EXTRA env variables used if specified +//! +//! Set the environment variable `CONDUWUIT_VERSION_EXTRA` to any UTF-8 string +//! to include it in parenthesis after the SemVer version. A common value are +//! git commit hashes. + use std::sync::OnceLock; static BRANDING: &str = "Conduwuit"; diff --git a/src/core/mod.rs b/src/core/mod.rs index 9716b46e..749d7b08 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -2,19 +2,19 @@ pub mod alloc; pub mod config; pub mod debug; pub mod error; +pub mod info; pub mod log; pub mod metrics; pub mod mods; pub mod pdu; pub mod server; pub mod utils; -pub mod version; pub use config::Config; pub use error::Error; +pub use info::{version, version::version}; pub use pdu::{PduBuilder, PduCount, PduEvent}; pub use server::Server; -pub use version::version; pub type Result = std::result::Result;