generated from zircote/rust-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
131 lines (108 loc) · 3.24 KB
/
Cargo.toml
File metadata and controls
131 lines (108 loc) · 3.24 KB
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
[package]
name = "rlm-cli"
version = "1.2.4"
edition = "2024"
rust-version = "1.88"
description = "Recursive Language Model (RLM) REPL for Claude Code - handles long-context tasks via chunking and recursive sub-LLM calls"
license = "MIT"
authors = ["zircote"]
repository = "https://github.com/zircote/rlm-rs"
homepage = "https://github.com/zircote/rlm-rs"
documentation = "https://docs.rs/rlm-cli"
readme = "README.md"
keywords = ["llm", "claude", "recursive", "language-model", "repl"]
categories = ["command-line-utilities", "text-processing"]
[lib]
name = "rlm_rs"
path = "src/lib.rs"
[[bin]]
name = "rlm-cli"
path = "src/main.rs"
[dependencies]
# Core dependencies
thiserror = "2.0.17"
anyhow = "1.0.102"
# CLI
clap = { version = "4.5", features = ["derive", "cargo", "env"] }
# Database
rusqlite = { version = "0.38", features = ["bundled", "modern_sqlite"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Text processing
unicode-segmentation = "1.12"
regex = "1.12"
# I/O
memmap2 = "0.9"
# Parallel processing
rayon = "1.10"
# FastEmbed for semantic embeddings (optional - fallback to hash-based if not available)
# Use rustls instead of native-tls (openssl) for TLS
fastembed = { version = "5", optional = true, default-features = false, features = ["ort-download-binaries", "hf-hub-rustls-tls"] }
# usearch HNSW vector search (optional - BM25-only fallback if not available)
# Pinned to <2.24: v2.24.0 has a MAP_FAILED POSIX constant that breaks Windows compilation
# See: https://github.com/unum-cloud/USearch/issues/715
usearch = { version = ">=2.23, <2.25", optional = true }
[dev-dependencies]
# Testing
proptest = "1.10.0"
test-case = "3.3.1"
tempfile = "3.26"
assert_cmd = "2.0"
predicates = "3.1"
# Benchmarking
criterion = "0.8"
# [[bench]]
# name = "chunking"
# harness = false
[profile.dev]
# Faster compile times during development
debug = 1
opt-level = 0
[profile.release]
# Optimize for size and speed
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
strip = true
[profile.release-debug]
inherits = "release"
debug = true
strip = false
[lints.rust]
# Enable additional warnings
unsafe_code = "warn"
missing_docs = "warn"
rust_2024_compatibility = "warn"
[lints.clippy]
# Deny all warnings in CI
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
# Allow multiple crate versions (transitive deps from fastembed we can't control)
multiple_crate_versions = "allow"
# Specific lints to deny
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
dbg_macro = "deny"
print_stdout = "deny"
print_stderr = "deny"
# Allow in certain contexts (can be overridden per-module)
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
redundant_pub_crate = "allow"
[features]
default = ["fastembed-embeddings"]
# FastEmbed semantic embeddings (ONNX-based, BGE-M3, 1024 dimensions)
fastembed-embeddings = ["dep:fastembed"]
# usearch HNSW vector search (native implementation)
usearch-hnsw = ["dep:usearch"]
# Full semantic search (embeddings + vector search)
full-search = ["fastembed-embeddings", "usearch-hnsw"]