Skip to main content

silk/
lib.rs

1pub mod bloom;
2pub mod clock;
3pub mod engine;
4pub mod entry;
5pub mod gossip;
6pub mod graph;
7pub mod obslog;
8pub mod ontology;
9pub mod oplog;
10#[cfg(feature = "python")]
11mod python;
12pub mod store;
13pub mod sync;
14
15// Re-exports for ergonomic Rust usage
16pub use bloom::BloomFilter;
17pub use clock::LamportClock;
18pub use entry::{Entry, GraphOp, Hash, Value};
19pub use gossip::PeerRegistry;
20pub use graph::{Edge, MaterializedGraph, Node};
21pub use obslog::{ObsLogError, Observation, ObservationLog};
22pub use ontology::{
23    EdgeTypeDef, MonotonicityError, NodeTypeDef, NodeTypeUpdate, Ontology, OntologyExtension,
24    PropertyDef, ValidationError, ValueType,
25};
26pub use oplog::{OpLog, OpLogError};
27pub use store::{Store, StoreError};
28pub use sync::{Snapshot, SyncOffer, SyncPayload, PROTOCOL_VERSION};
29
30/// PyO3 module entry point — called by Python when `import silk._native`.
31#[cfg(feature = "python")]
32#[pyo3::pymodule]
33fn _native(m: &pyo3::Bound<'_, pyo3::types::PyModule>) -> pyo3::PyResult<()> {
34    python::register(m)?;
35    Ok(())
36}