[#3] Split the tavern project into a workspace.

**tavern** - The blogging system library.
**loremaster** - Creates the database from a blogging repository.
**bard** - Dioxus components to display the blog.
This commit is contained in:
2025-08-29 20:43:36 -04:00
parent 7b5c69cc50
commit 3c6e82dfaf
40 changed files with 2766 additions and 33 deletions

33
bard/src/info.rs Normal file
View File

@ -0,0 +1,33 @@
//! This is where the cargo build information can be retrieved from.
/// The environment variable defined by Cargo for the name.
const NAME: Option<&str> = option_env!("CARGO_PKG_NAME");
/// The environment variable defined by Cargo for the version.
const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION");
/// The string to display if a value is not defined during compile time.
const NOT_DEFINED: &'static str = "UNDEFINED";
/// Returns the name of the program as defined by the CARGO_PKG_NAME. This is
/// set at compile time and comes from the Cargo.toml file.
///
/// If a value is not found, then it will return the not defined value.
pub fn get_name() -> &'static str
{
NAME.unwrap_or(NOT_DEFINED)
}
/// Returns the version of the program as defined by the CARGO_PKG_VERSION.
/// This is set at compile time and comes from the Cargo.toml file.
///
/// If a value is not found, then it will return the not defined value.
pub fn get_version() -> &'static str
{
VERSION.unwrap_or(NOT_DEFINED)
}

7
bard/src/lib.rs Normal file
View File

@ -0,0 +1,7 @@
//! Dioxus components that will display a Tavern blogging system Blog.
mod info;
pub use crate::info::{get_name, get_version};