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

ambee/giterated

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

Create `NetworkedSubstack`.

# giterated-protocol - Create `NetworkedSubstack` which will handle all networked operations giterated needs - Add support for `NetworkedSubstack` for both the daemon and client - Pipe everything through but leave APIs temp # `giterated-daemon` - Remove a bunch of random old code, dead code, and files that aren't needed. - Moved all connection handling to `client.rs`, simplified connection logic with new types

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨202bb12

⁨giterated-daemon/src/lib.rs⁩ - ⁨419⁩ 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 client;
8 pub mod database_backend;
9
10 #[macro_use]
11 extern crate tracing;
12
13 pub fn version() -> Version {
14 Version::from_str(env!("CARGO_PKG_VERSION")).unwrap()
15 }
16
17 pub fn validate_version(other: &Version) -> bool {
18 let version_req = VersionReq::from_str("=0.0.6").unwrap();
19
20 version_req.matches(other)
21 }
22