mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Add ability to inspect build information and features at runtime
Also re-adds ability to inspect used features
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
name = "conduwuit_core"
|
||||
description.workspace = true
|
||||
edition.workspace = true
|
||||
homepage.workspace = true
|
||||
license.workspace = true
|
||||
readme.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
//! Information about features the crates were compiled with.
|
||||
//! Only available for crates that have called the `introspect_crate` macro
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
pub static ENABLED_FEATURES: std::sync::Mutex<BTreeMap<&str, &[&str]>> =
|
||||
std::sync::Mutex::new(BTreeMap::new());
|
||||
@@ -1,3 +1,4 @@
|
||||
pub mod introspection;
|
||||
pub mod room_version;
|
||||
pub mod version;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ pub use ::smallstr;
|
||||
pub use ::smallvec;
|
||||
pub use ::toml;
|
||||
pub use ::tracing;
|
||||
pub use conduwuit_build_metadata as build_metadata;
|
||||
pub use config::Config;
|
||||
pub use error::Error;
|
||||
pub use info::{
|
||||
@@ -34,6 +35,8 @@ pub use utils::{implement, result, result::Result};
|
||||
|
||||
pub use crate as conduwuit_core;
|
||||
|
||||
conduwuit_macros::introspect_crate! {}
|
||||
|
||||
#[cfg(any(not(conduwuit_mods), not(feature = "conduwuit_mods")))]
|
||||
pub mod mods {
|
||||
#[macro_export]
|
||||
|
||||
Reference in New Issue
Block a user