diff options
Diffstat (limited to 'crates/shirabe/src/composer.rs')
| -rw-r--r-- | crates/shirabe/src/composer.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/shirabe/src/composer.rs b/crates/shirabe/src/composer.rs index 356aefc1..fca19539 100644 --- a/crates/shirabe/src/composer.rs +++ b/crates/shirabe/src/composer.rs @@ -21,6 +21,16 @@ pub const RELEASE_DATE: &str = "2026-04-14 13:31:52"; pub const SOURCE_VERSION: &str = ""; pub const RUNTIME_API_VERSION: &str = "2.2.2"; +/// The deadline after which a development build reports itself as outdated, or `None` for a build +/// made from a tagged revision. Baked in by `build.rs`. +/// +/// Composer declares this as the global constant COMPOSER_DEV_WARNING_TIME from its phar stub, so +/// a plugin can read it back with `defined()`/`constant()`. Here it is a Rust constant, and +/// plugins cannot observe it. Technically speaking, it is incompatible with Composer, but trivial +/// enough. +pub const COMPOSER_DEV_WARNING_TIME: Option<i64> = + include!(concat!(env!("OUT_DIR"), "/dev_warning_time.rs")); + pub fn get_version() -> String { if VERSION == "@package_version@" { return SOURCE_VERSION.to_string(); |
