Skip to main content

lace_sans_io/core/
mod.rs

1//! Runtime-neutral Lace interlace core.
2//!
3//! Core owns interlace state and policy evaluation. When a machine needs store
4//! data or persistence, its one machine-owned `StoreCall` suspends progress until
5//! the runtime-owned Lace submits the matching result. Rust projects facts
6//! and Datalog bindings above store result data. Stores do not evaluate exchange
7//! policy and do not know what "advertisable" means.
8
9use std::collections::{HashMap, HashSet, VecDeque};
10use std::sync::Arc;
11
12pub use crate::logic::{ExchangePlan, LocalExecutablePolicy};
13use crate::logic::{
14    compile_exchange_plan, lower_exchange_plan_for_local_side, visit_fields as visit_record_fields,
15    visit_record_links,
16};
17use crate::records::RecordMetadata;
18pub use crate::records::{Record, RecordHash, RecordKind};
19
20static NEXT_INTERLACE_ID: IdSequence = IdSequence::new();
21static NEXT_FIXED_POINT_ID: IdSequence = IdSequence::new();
22static NEXT_STORE_CALL_ID: IdSequence = IdSequence::new();
23
24mod advertisement;
25mod carrier;
26mod direct;
27pub(crate) mod id_sequence;
28mod interlace;
29mod listing;
30mod listing_delta;
31pub mod listing_symbols;
32mod machine;
33mod operand_cache;
34mod peer_proof;
35mod retention;
36mod session_evaluation;
37mod store_query;
38mod types;
39
40use self::id_sequence::IdSequence;
41
42pub use self::carrier::{CarrierState, ConnectedCarrier, NonceSeed, PrefaceCause};
43pub use self::direct::DirectPair;
44pub use self::interlace::InterlaceMachine;
45pub use self::listing::{AdvertisementListing, ListingChange, ListingEntries};
46pub use self::machine::{SessionMachine, SessionState, validate_store_result};
47pub use self::operand_cache::OperandCache;
48#[doc(hidden)]
49pub use self::retention::{
50    RETENTION_WINDOW_RECORDS, RETENTION_WORK_PER_RECORD, RetainedRecords, RetentionPoll,
51    RetentionSweep,
52};
53pub use self::store_query::record_matches_store_query;
54pub use self::types::*;
55
56use self::advertisement::{
57    advertisement_records_from_load_result, verify_advertisement_matches_record,
58};
59use self::types::AdvertisementSchema;
60
61#[cfg(test)]
62mod evaluation_cost_tests;
63mod low_level;