1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//! ix — sub-millisecond code search via sparse trigram indexing.
//!
//! `ix` pre-computes a byte-level trigram index to narrow search candidates
//! to a fraction of the total file set, then verifies matches with a
//! memory-constant streaming architecture. This eliminates the linear-scan
//! bottleneck of traditional tools on large codebases.
//!
//! # Installation
//!
//! ```bash
//! cargo install moeix
//! ```
//!
//! # Quick Start
//!
//! ```bash
//! ix --build /path/to/repo
//! ix "fn validate"
//! ix --regex "fn\\s+\\w+_handler" --context 3
//! ```
//!
//! # Library Usage
//!
//! ```rust,ignore
//! use ix::reader::Reader;
//! use ix::executor::{Executor, QueryOptions};
//! use ix::planner::Planner;
//!
//! let reader = Reader::open(".ix/shard.ix")?;
//! let plan = Planner::plan("struct Config", false);
//! let mut executor = Executor::new(&reader);
//! let (matches, stats) = executor.execute(&plan, &QueryOptions::default())?;
//! ```
//!
//! # Module Build Order
//!
//! `format` → `varint` → `trigram` → `bloom` → `posting` →
//! `string_pool` → `builder` → `reader` → `planner` → `executor`
//!
//! Cache layer: `posting_cache` · `neg_cache` · `regex_pool` (used by `executor`)
//!
//! Policy: `cache_policy` (standalone, adapts to `ResourceGuard` pressure)
//!
//! Support: `scanner` (fallback, no index) · `streaming` (line/mmap alternatives) ·
//! `api` (convenience wrapper) · `config` (`.ixd.toml`)
//!
//! # See Also
//!
//! - [GitHub README](https://github.com/moeshawky/ix) — install, quick start, daemon
//! - [Socket API](https://github.com/moeshawky/ix/blob/main/docs/SOCKET-API.md) — daemon IPC protocol
//!
//! # Feature Flags
//!
//! - **`notify`** (default) — File watcher + daemon (`ixd`) + Unix domain socket IPC
//! - **`decompress`** — gz/zst/bz2/xz decompression
//! - **`archive`** — zip/tar archive support
//! - **`full`** — All optional features
// Lint configuration — Tier 1 security hardened, pedantic with pragmatic allow
// 64-bit target; try_from guards runtime
// controlled internal values
// controlled internal values
// module::Type is idiomatic
// scanner/executor are well-structured
// enterprise: every public item documented
// tests: no doc needed for test fns
extern crate llmosafe;
/// HTTP API surface for programmatic index access.
/// ZIP and tar archive indexing support.
/// Bloom filter implementation for fast membership testing.
/// Index builder — coordinates the pipeline from file discovery to shard serialization.
/// Adaptive cache policy driven by `ResourceGuard` memory pressure.
/// Runtime and build configuration, including `.ixd.toml` parsing.
/// Background daemon that watches for file changes and rebuilds the index.
/// Unix domain socket IPC between the daemon and CLI clients.
/// Decompression support for gz, zst, bz2, and xz files.
/// Error types for the ix crate.
/// Query executor — runs a search plan against the index.
/// Index file format definitions and magic bytes.
/// Idle timeout tracker for the daemon process.
/// Negative result cache — skips re-verification of known non-matching files.
/// Query planner — converts a pattern string into an execution plan.
/// Posting list storage for trigram-to-file mappings.
/// LRU cache for decoded posting lists, keyed by trigram.
/// Index reader — loads and queries a pre-built shard.
/// Compiled regex pool — caches `Regex` objects to avoid recompilation.
/// File scanner — fallback linear search when no index is available.
/// Alternative streaming file search implementations — line-based and
/// mmap-windowed verification with context support.
/// Deduplicated string storage for file paths and identifiers.
/// Trigram extraction and byte-level pattern matching.
/// Variable-length integer encoding for compact index storage.
/// Filesystem watcher — monitors directories for file changes.
pub use crateBuilder;
pub use crate;
pub use crateBeacon;
pub use crateIdleTracker;
pub use crateWatcher;
/// Run the daemon watching the given directory for changes and rebuilding the index.
///
/// This function is deprecated. Use [`crate::daemon::run`] instead.
///
/// # Errors
///
/// Delegates to [`daemon::run`]; see that function for error conditions.