JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Begin new protocol refactor

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨26651b1

⁨giterated-daemon/src/lib.rs⁩ - ⁨474⁩ bytes
Raw
1 use std::str::FromStr;
2
3 use semver::{Version, VersionReq};
4
5 pub mod authentication;
6 pub mod backend;
7 pub mod connection;
8 pub mod database_backend;
9 pub mod federation;
10 pub mod keys;
11 pub mod message;
12
13 #[macro_use]
14 extern crate tracing;
15
16 pub fn version() -> Version {
17 Version::from_str(env!("CARGO_PKG_VERSION")).unwrap()
18 }
19
20 pub fn validate_version(other: &Version) -> bool {
21 let version_req = VersionReq::from_str("=0.0.6").unwrap();
22
23 version_req.matches(other)
24 }
25