1pub mod api;
20#[cfg(feature = "bench-internals")]
21mod bench;
22pub mod client;
23#[cfg(feature = "crdt-yjs")]
26pub mod crdt;
27pub mod native_transport;
31mod progress;
32mod round;
33pub use progress::{
34 ProgressObserver, ProgressPhase, ProgressState, ProgressSubscription, SyncProgress,
35 SyncProgressListener,
36};
37pub use round::{
38 AppliedSyncRound, CompletedSyncRound, PreparedSyncRound, RoundOperation, RoundReply,
39};
40pub mod previous_version;
43pub mod query_guard;
44pub mod realtime_round;
45pub mod remote;
46pub mod schema;
47pub mod transport;
48pub mod values;
49
50#[cfg(any(test, all(target_arch = "wasm32", target_os = "unknown")))]
52mod wasm_vfs;
53
54#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
58pub(crate) fn wall_clock_ms() -> i64 {
59 js_sys::Date::now() as i64
60}
61
62#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
66pub(crate) fn wall_clock_ms() -> i64 {
67 std::time::SystemTime::now()
68 .duration_since(std::time::UNIX_EPOCH)
69 .expect("system clock predates Unix epoch")
70 .as_millis() as i64
71}
72
73pub use api::{
74 creation_time_bucket, last, AppliedServerCommit, AppliedServerCommitSource,
75 AuthorityReadDeclaration, ClientChangeBatch, ClientDiagnosticsHost, ClientDiagnosticsLease,
76 ClientDiagnosticsReplica, ClientDiagnosticsRequest, ClientDiagnosticsSchema,
77 ClientDiagnosticsSnapshot, ClientDiagnosticsStorage, ClientError, ClientLimits, CommandEffects,
78 CommitDelivery, CommitOperation, CommitOperationOutcome, CommitOutcome, CommitOutcomeQuery,
79 CommitOutcomeResolution, CommitOutcomeStatus, ConflictRecord, CoverageSnapshot,
80 CurrentBaseProof, CurrentBaseProofReason, DiagnosticLastChange, DiagnosticLastRound,
81 DiagnosticQueryFailure, DiagnosticRoundCounters, DiagnosticSubscription,
82 ExpectedDiagnosticSubscription, FetchedBlob, LocalDataPurgeInput, LocalDataPurgeResult,
83 LocalDataPurgeTarget, LocalDataRebootstrapInput, LocalDataRebootstrapResult, Mutation,
84 PresencePeer, QueryOwner, QueryReadFailure, QueryRow, QuerySnapshot, QueryValue,
85 RealtimePolicy, RealtimeState, RejectionRecord, ResolveCommitOutcomeInput, RetainedCommitRow,
86 RetainedUniqueConflict, RowState, SchemaFloor, SnapshotRead, SubscriptionCatchup,
87 SubscriptionRequest, SubscriptionStateView, SyncIntent, SyncOutcome, SyncReport,
88 SyncStatusSnapshot, TableChange, TimeBucketUnit, TransportCauseKind, WindowBase, WindowChange,
89 WindowCoverage, WindowState, WindowUnitRef, CLIENT_DIAGNOSTICS_VERSION,
90 LOCAL_AUTHORITY_UNCONFIGURED_CODE, MAX_DIAGNOSTIC_EXPECTED_SUBSCRIPTIONS,
91 MAX_DIAGNOSTIC_QUERY_FAILURES, REALTIME_LOST_CODE, REALTIME_UNAVAILABLE_CODE,
92};
93pub use client::{
94 CurrentBasePreparation, FileQuerySnapshotReader, SnapshotReadRequest, SnapshotStatement,
95 SyncClient, SECURITY_PREFLIGHT_REQUIRED_CODE,
96};
97pub use schema::{compile_schema, parse_schema_json, ClientSchema};
98pub use transport::{
99 BlobDownload, BlobUploadGrant, SegmentFetch, SegmentRequest, Transport, TransportError,
100};
101
102pub use realtime_round::{RealtimeRound, RoundInbound, REALTIME_TAG_DELTA, REALTIME_TAG_ROUND};
106pub use remote::{
107 PreparedRemoteCommit, RemoteBytes, RemoteClientError, RemoteCommandResult, RemoteCommitInput,
108 RemoteCommitResult, RemoteQueryResult, SyncRemoteClient,
109};
110pub use ssp2::{MessageStreamScanner, ScannedMessage};