1#![cfg_attr(not(target_family = "wasm"), deny(missing_docs))]
32
33#[cfg(target_family = "wasm")]
34compile_error!(
35 "rig-memvid does not currently support `wasm` targets: memvid-core requires \
36 synchronous file I/O and OS-level file locks. Disable rig-memvid for wasm \
37 builds via Cargo target-specific dependencies."
38);
39
40#[cfg(not(target_family = "wasm"))]
41mod cards_context;
42#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
43mod compactor;
44#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
45mod dedup;
46#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
47mod demotion;
48#[cfg(not(target_family = "wasm"))]
49mod error;
50#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
51mod frame_writer;
52#[cfg(not(target_family = "wasm"))]
53mod hook;
54#[cfg(not(target_family = "wasm"))]
55pub mod inmem;
56#[cfg(not(target_family = "wasm"))]
57mod memory_graph;
58#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
59pub mod metadata;
60#[cfg(all(not(target_family = "wasm"), feature = "context-projection"))]
61pub mod projection;
62#[cfg(all(not(target_family = "wasm"), feature = "context-projection"))]
63pub use projection::{
64 IntoContextItem, MemoryCandidate, MemoryContextPack, SupersededCandidate,
65 card_docs_to_context_items, inmem_hits_to_context_items, items_to_memory_candidates,
66 memory_cards_to_context_items, search_hits_to_context_items, supersede,
67};
68#[cfg(all(
69 not(target_family = "wasm"),
70 feature = "context-projection",
71 feature = "compaction"
72))]
73pub use projection::{
74 MemoryFrameRole, PartitionedHits, frame_role, partition_search_hits_by_role,
75 typed_search_hit_to_context_item, typed_search_hits_to_context_items,
76 typed_search_hits_to_memory_candidates,
77};
78#[cfg(not(target_family = "wasm"))]
79mod store;
80
81#[cfg(not(target_family = "wasm"))]
82pub use cards_context::{CardDoc, CardSelection, MemoryCardContext};
83#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
84pub use compactor::MemvidStoringCompactor;
85#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
86pub use demotion::MemvidDemotionHook;
87#[cfg(not(target_family = "wasm"))]
88pub use error::MemvidError;
89#[cfg(not(target_family = "wasm"))]
90pub use hook::{
91 MemoryConfig, MemoryConfigBuilder, MemvidPersistHook, WriteFailure, WriteFailureAction,
92 WriteFailurePhase, WritePolicy, WriteTransform,
93};
94#[cfg(not(target_family = "wasm"))]
95pub use inmem::{Episode, InMemoryError, InMemoryHit, InMemoryStore};
96#[cfg(not(target_family = "wasm"))]
97pub use memory_graph::MemoryGraph;
98#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
99pub use metadata::{FrameKind, MemvidFrameMetadata};
100#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
104pub use rig::memory::{Compactor, DemotionHook, MemoryError};
105#[cfg(all(not(target_family = "wasm"), feature = "compaction"))]
106pub use rig_memory::{CompactingMemory, TemplateCompactor, TextSummary};
107#[cfg(not(target_family = "wasm"))]
108pub use store::{MemvidFilter, MemvidStore, MemvidStoreBuilder};
109
110#[cfg(not(target_family = "wasm"))]
111pub use memvid_core::types::{LogicMeshStats, SearchHitEntity};
112#[cfg(not(target_family = "wasm"))]
118pub use memvid_core::{
119 EntityKind, FollowResult, MemoryCard, MemoryCardId, MemoryKind, MeshEdge, MeshNode, Polarity,
120 VersionRelation,
121};
122
123#[cfg(not(target_family = "wasm"))]
124pub use memvid_core;