Skip to main content

syncspin_core/
lib.rs

1//! Protocol core for Sendspin.
2//!
3//! This crate owns everything that is shared between client and server and that must exist
4//! exactly once: the Noise handshake, message framing, the message types and the clock filter.
5//! It knows no transport and no device integration, and it never depends on the
6//! `syncspin-client` or `syncspin-server` crates.
7//!
8//! This is a `0.1` work in progress: the Noise layer, the message types, the framing layer, the
9//! clock filter and the pairing token exist so far.
10
11pub mod clock;
12pub mod framing;
13pub mod messages;
14pub mod noise;
15pub mod pairing;
16
17/// Returns the version of this crate as recorded in its manifest.
18pub fn version() -> &'static str {
19    env!("CARGO_PKG_VERSION")
20}
21
22#[cfg(test)]
23mod tests {
24    use super::*;
25
26    #[test]
27    fn version_is_the_workspace_version() {
28        assert_eq!(version(), "0.1.1");
29    }
30}