/*
==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--

R1

Copyright (C) 2019-2026  Anonymous

There are several releases over multiple years,
they are listed as ranges, such as: "2019-2026".

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
*/

//! # R1
//!
//! ## Project
//!
//! - License: GNU Lesser General Public License, either version 3, or (at your option) any later version.
//! - _This project follows [Semantic Versioning 2.0.0]_
//!
//! ## Features
//!
//! This project offers a program via `bin` feature. The program helps run one single instance of any program.
//!
//! For more details, please run the program with `help` command.
//!
//! Currently all features are tested only on Linux. On other Unix systems, the program might or might not work.
//!
//! ## Why?
//!
//! For example, [Qt Creator][w:qt] can run multiple instances. Sometimes you don't want that. Unfortunately there's no setting to tell it to
//! run just one single instance.
//!
//! There are 2 solutions:
//!
//! 1. You can file a feature request (with a picture of your cat in it), and start praying for it to be accepted.
//!
//!     This could take some time. But it's probably not one day. It's not 2 days either.
//!
//!     1 week? Still seems impossible.
//!
//!     ...
//!
//! 2. Or,
//!
//!     You can `r1` it, professionally, just like this:
//!
//!     ```shell
//!     ~> r1 --target=/usr/bin/qtcreator --app-name='Qt Creator'
//!     ```
//!
//!     Tip: you can find its icon here: <https://code.qt.io/cgit/qt-creator/qt-creator.git/>
//!
//! [Semantic Versioning 2.0.0]: https://semver.org/spec/v2.0.0.html
//! [w:qt]: https://www.qt.io

#![warn(missing_docs)]

// ╔═════════════════╗
// ║   IDENTIFIERS   ║
// ╚═════════════════╝

macro_rules! code_name  { () => { "r1" }}
macro_rules! version    { () => { "0.7.8" }}

/// # Crate name
pub const NAME: &str = "R1";

/// # Crate code name
pub const CODE_NAME: &str = code_name!();

/// # ID of this crate
pub const ID: &str = concat!(
    "92367fde-2e86b5fd-1d7b3683-12c3d9d1-85e42107-90fbb262-6dcedd26-29c7d618-",
    "5a713581-44f9add9-b6228f68-5a00c403-9a9c7576-798701e2-5d1671b0-76639e53",
);

/// # Crate version
pub const VERSION: &str = version!();

/// # Crate release date (year/month/day)
pub const RELEASE_DATE: (u16, u8, u8) = (2026, 2, 1);

/// # Tag, which can be used for logging...
pub const TAG: &str = concat!(code_name!(), "::92367fde::", version!());

// ╔════════════════════╗
// ║   IMPLEMENTATION   ║
// ╚════════════════════╝

pub mod version_info;

/// # Result type used in this crate
pub type Result<T> = std::io::Result<T>;

#[test]
fn test_crate_version() {
    assert_eq!(VERSION, env!("CARGO_PKG_VERSION"));
}
