-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
202 lines (158 loc) · 5.14 KB
/
Copy pathCargo.toml
File metadata and controls
202 lines (158 loc) · 5.14 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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
[workspace]
members = [".", "policy-engine-benchmarks"]
resolver = "2"
[workspace.package]
edition = "2021"
authors = ["LLM Policy Engine Team"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/llm-policy-engine/llm-policy-engine"
[workspace.dependencies]
# Async runtime
tokio = { version = "1.35", features = ["full"] }
futures = "0.3"
async-trait = "0.1"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
# Error handling
thiserror = "1.0"
anyhow = "1.0"
# Logging and tracing (LLM Dev Ops Platform Unified Telemetry Stack)
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
tracing-opentelemetry = "0.28"
opentelemetry = { version = "0.27", features = ["trace"] }
opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.27", features = ["grpc-tonic"] }
opentelemetry-semantic-conventions = "0.27"
# Time and date
chrono = { version = "0.4", features = ["serde"] }
# CLI
clap = { version = "4.4", features = ["derive", "env"] }
# UUID
uuid = { version = "1.6", features = ["v4", "serde"] }
# Testing
criterion = { version = "0.5", features = ["async_tokio"] }
# LLM Dev Ops Platform Dependencies (compile-time only - Phase 2A)
# Schema Registry - Schema validation and management for LLM operations
schema-registry-core = { git = "https://github.com/LLM-Dev-Ops/schema-registry", branch = "main" }
# Config Manager - Configuration management with RBAC and encryption
llm-config-core = { git = "https://github.com/LLM-Dev-Ops/config-manager", branch = "main" }
# Observatory - Observability and telemetry aggregation
llm-observatory-core = { git = "https://github.com/LLM-Dev-Ops/observatory", branch = "main" }
[package]
name = "llm-policy-engine"
version = "0.1.0"
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "High-performance policy engine for LLM operations"
keywords = ["llm", "policy", "security", "governance", "ai"]
categories = ["authentication", "security", "api-bindings"]
[lib]
name = "llm_policy_engine"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
[[bin]]
name = "policy-engine"
path = "src/daemon/main.rs"
[dependencies]
# Async runtime
tokio = { version = "1.35", features = ["full"] }
futures = "0.3"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
# Error handling
thiserror = "1.0"
anyhow = "1.0"
# Logging and tracing (LLM Dev Ops Platform Unified Telemetry Stack)
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
tracing-opentelemetry = "0.28"
opentelemetry = { version = "0.27", features = ["trace"] }
opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.27", features = ["grpc-tonic"] }
opentelemetry-semantic-conventions = "0.27"
# gRPC (upgraded for opentelemetry-otlp 0.27 compatibility)
tonic = { version = "0.12", features = ["tls", "tls-roots"] }
prost = "0.13"
prost-types = "0.13"
# HTTP
axum = { version = "0.7", features = ["macros"] }
tower = "0.4"
tower-http = { version = "0.5", features = ["cors", "trace"] }
hyper = "1.1"
# Expression evaluation (CEL)
cel-interpreter = "0.7"
# WASM runtime (sandboxing)
wasmtime = "16.0"
# Caching
lru = "0.12"
parking_lot = "0.12"
moka = { version = "0.12", features = ["future"] }
# Time and date
chrono = { version = "0.4", features = ["serde"] }
# Configuration
config = "0.13"
clap = { version = "4.4", features = ["derive", "env"] }
# Cryptography
blake3 = "1.5"
sha2 = "0.10"
# Metrics
prometheus = "0.13"
metrics = "0.21"
metrics-exporter-prometheus = "0.13"
# Redis (optional distributed cache)
redis = { version = "0.24", features = ["tokio-comp", "connection-manager"], optional = true }
# Database (for policy storage)
sqlx = { version = "0.7", features = ["runtime-tokio-native-tls", "postgres", "sqlite"], optional = true }
# Policy registry client
reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
# Validation
validator = { version = "0.16", features = ["derive"] }
regex = "1.10"
# Rate limiting
governor = "0.6"
# UUID
uuid = { version = "1.6", features = ["v4", "serde"] }
# Concurrency primitives
arc-swap = "1.6"
dashmap = "5.5"
# CLI
indicatif = "0.17"
console = "0.15"
# LLM Dev Ops Platform Dependencies (compile-time only - Phase 2A)
# These dependencies are added for structural integration. Runtime consumption
# logic and adapters will be implemented in Phase 2B.
schema-registry-core = { workspace = true }
llm-config-core = { workspace = true }
llm-observatory-core = { workspace = true }
[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
proptest = "1.4"
mockito = "1.2"
wiremock = "0.6"
[build-dependencies]
tonic-build = "0.12"
[features]
default = ["redis-cache", "postgres-storage"]
redis-cache = ["redis"]
postgres-storage = ["sqlx"]
sqlite-storage = ["sqlx"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[profile.bench]
inherits = "release"
[[bench]]
name = "policy_evaluation"
harness = false
[[bench]]
name = "cache_performance"
harness = false