Spec §3 (decision D-b) lists `Frame` and `WireError` as private; lib.rs re-exported both. Only `frame_sender` stays public. - The pinned vectors in tests/vectors.rs now compile in-crate as a `#[cfg(test)] #[path]` module (autotests = false keeps Cargo from also building them as an integration test). Every golden vector now checks `encode() == GOLDEN` as well as the decode, and new literal vectors pin a trailing-byte rejection and an addressed Obs with a nonzero age and an `observed_at`. - A `#[doc(hidden)]` `conformance` module (behind the `conformance` feature) gives the fuzz harness byte-level frame encoders/decoders and core's local limits without exposing `Frame`. The fuzz_twin test target now requires `conformance`, which scripts/ci.sh enables. - compile_fail doctests pin that `Frame`/`WireError` are unreachable. - Remove the THROWAWAY gen_missing_golden_vectors test and fix stale wire.rs comments about the version/tag byte offsets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.2 KiB
Rust
49 lines
1.2 KiB
Rust
//! tines-core: content-defined Observation identity and shared-memory core.
|
|
#![no_std]
|
|
#![deny(missing_docs)]
|
|
|
|
#[cfg(feature = "alloc")]
|
|
extern crate alloc;
|
|
|
|
pub mod belief;
|
|
mod bloom;
|
|
#[cfg(feature = "conformance")]
|
|
#[doc(hidden)]
|
|
pub mod conformance;
|
|
pub mod consts;
|
|
mod exchange;
|
|
mod frag;
|
|
#[cfg(feature = "alloc")]
|
|
pub mod mem_store;
|
|
pub mod node;
|
|
pub mod observation;
|
|
pub mod store;
|
|
#[cfg(feature = "conformance")]
|
|
pub mod store_conformance;
|
|
pub mod transport;
|
|
mod wire;
|
|
|
|
pub use belief::{BeliefPolicy, LatestWins, SelfFirst};
|
|
pub use exchange::{DropReason, NodeEvent};
|
|
pub use node::{Node, ObserveError};
|
|
pub use observation::{
|
|
Dest, NodeId, Observation, ObservationId, Payload, SigAlgo, Signature, Tick, Topic,
|
|
};
|
|
pub use store::{Store, StoreError, TrimPolicy, WallClockStore};
|
|
pub use transport::{Event, FrameBuf, SendError, Transport};
|
|
pub use wire::frame_sender;
|
|
|
|
#[cfg(feature = "alloc")]
|
|
pub use mem_store::MemStore;
|
|
|
|
#[cfg(test)]
|
|
extern crate std;
|
|
|
|
// The pinned wire vectors (spec §7) need the crate-private `Frame` and
|
|
// `WireError`, so they compile as a unit-test module rather than as an
|
|
// integration test (`autotests = false` in Cargo.toml keeps Cargo from also
|
|
// building them as one).
|
|
#[cfg(test)]
|
|
#[path = "../tests/vectors.rs"]
|
|
mod vectors;
|