pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub struct PackageInfo {
pub name: &'static str,
pub version: &'static str,
pub description: &'static str,
pub website: &'static str,
pub status: &'static str,
}
pub fn get_info() -> PackageInfo {
PackageInfo {
name: "Blazegraph IO Core",
version: VERSION,
description: "Core library for semantic document graph processing",
website: "https://blazegraph.io",
status: "coming-soon",
}
}
pub fn print_info() {
let info = get_info();
println!("{} - {}", info.name, info.description);
println!("Version: {}", info.version);
println!("Visit {} for updates", info.website);
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
assert_eq!(VERSION, "0.0.1");
}
#[test]
fn test_package_info() {
let info = get_info();
assert_eq!(info.name, "Blazegraph IO Core");
assert_eq!(info.status, "coming-soon");
}
}