1pub const VERSION_LETTER: &str = "v-pocket-R1";
8
9pub const VERSION_DATE: &str = "04012025";
11
12pub const VERSION_STRING: &str = "Pocket v-pocket-R1 (03172025 - Core Implementations)";
14
15pub const COMPATIBILITY: Option<&str> = Some("");
17
18pub const AUTHOR: &str = "frgmt0 (j)";
19
20pub fn get_version() -> Version {
22 Version {
23 letter: VERSION_LETTER,
24 date: VERSION_DATE,
25 semver: env!("CARGO_PKG_VERSION"),
26 name: "Core Implementations",
27 compatibility: COMPATIBILITY,
28 stability: Stability::Beta,
29 author: AUTHOR,
30 }
31}
32
33pub enum Stability {
35 Alpha,
37
38 Beta,
40
41 Candidate,
43
44 Release,
46}
47
48impl std::fmt::Display for Stability {
49 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
50 match self {
51 Stability::Alpha => write!(f, "Alpha"),
52 Stability::Beta => write!(f, "Beta"),
53 Stability::Candidate => write!(f, "Candidate"),
54 Stability::Release => write!(f, "Release"),
55 }
56 }
57}
58
59pub struct Version {
61 pub letter: &'static str,
63
64 pub date: &'static str,
66
67 pub semver: &'static str,
69
70 pub name: &'static str,
72
73 pub compatibility: Option<&'static str>,
75
76 pub stability: Stability,
78
79 pub author: &'static str,
81}
82
83impl std::fmt::Display for Version {
84 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
85 write!(f, "Built by {}\n\n", self.author)?;
86 write!(f, "{}", self.letter)?;
87
88 if let Some(compat) = self.compatibility {
89 write!(f, " - {}", compat)?;
90 }
91
92 write!(f, " ({})", self.name)?;
93
94 Ok(())
95 }
96}