Skip to main content

radicle_node/
lib.rs

1// N.b. Rust 1.85 introduced some annoying clippy warnings about using `b""`
2// syntax in place of `b''`, but in our cases they were u8 and not [u8] so the
3// suggestions did not make sense.
4#![allow(clippy::byte_char_slices)]
5
6pub mod fingerprint;
7pub mod reactor;
8pub mod runtime;
9
10mod control;
11pub(crate) use radicle_protocol::service;
12mod wire;
13mod worker;
14
15#[cfg(any(test, feature = "test"))]
16pub mod test;
17#[cfg(test)]
18pub mod tests;
19
20extern crate radicle_localtime as localtime;
21
22use radicle::version::Version;
23
24pub use localtime::{LocalDuration, LocalTime};
25pub use radicle::node::Link;
26pub use radicle::node::PROTOCOL_VERSION;
27pub use radicle::prelude::Timestamp;
28pub use radicle::{collections, crypto, git, identity, node, profile, rad, storage};
29pub use runtime::Runtime;
30
31/// Node version.
32pub const VERSION: Version = Version {
33    name: env!("CARGO_PKG_NAME"),
34    commit: env!("GIT_HEAD"),
35    version: env!("RADICLE_VERSION"),
36    timestamp: env!("SOURCE_DATE_EPOCH"),
37};
38
39pub mod prelude {
40    pub use crate::crypto::{PublicKey, Signature};
41    pub use crate::identity::{Did, RepoId};
42    pub use crate::node::{Address, Event, NodeId, config::Network};
43    pub use crate::service::filter::Filter;
44    pub use crate::service::{DisconnectReason, Message};
45    pub use crate::storage::WriteStorage;
46    pub use crate::storage::refs::Refs;
47    pub use crate::{LocalDuration, LocalTime, Timestamp};
48}