-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
343 lines (286 loc) · 11 KB
/
Cargo.toml
File metadata and controls
343 lines (286 loc) · 11 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
# SPDX-License-Identifier: AGPL-3.0-or-later
[workspace]
resolver = "2"
members = [
"crates/petal-tongue-core",
"crates/petal-tongue-graph",
"crates/petal-tongue-animation",
"crates/petal-tongue-telemetry",
"crates/petal-tongue-api",
"crates/petal-tongue-discovery",
"crates/petal-tongue-entropy",
"crates/petal-tongue-adapters", # Adapter system
"crates/petal-tongue-ipc", # IPC
"crates/petal-tongue-cli", # CLI tools
"crates/petal-tongue-ui-core", # Pure Rust UI (Tier 1)
"crates/petal-tongue-ui", # Tier 2: Native GUI (egui)
"crates/petal-tongue-tui", # Rich TUI (Terminal UI)
"crates/petal-tongue-headless", # Headless binary (Tier 1 only)
"crates/petal-tongue-types", # Portable data types (WASM-compatible)
"crates/petal-tongue-scene", # Declarative scene graph + modality compilers
"crates/petal-tongue-wasm", # Client WASM rendering module
"crates/doom-core", # Doom integration for platform testing
# BingoCube is now a standalone tool at bingoCube/
# (it has its own workspace with core, adapters, demos)
]
[[bin]]
name = "petaltongue"
path = "src/main.rs"
[lints]
workspace = true
[package]
name = "petaltongue-workspace"
description = "Universal visualization primal for the ecoPrimals ecosystem"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
[workspace.package]
version = "1.6.6"
edition = "2024"
rust-version = "1.87"
license = "AGPL-3.0-or-later"
repository = "https://github.com/ecoPrimals/petalTongue"
authors = ["ecoPrimals Project"]
readme = "README.md"
keywords = ["visualization", "ecosystem", "ipc", "json-rpc", "pure-rust"]
categories = ["visualization", "gui", "command-line-interface"]
[workspace.dependencies]
# Async runtime
tokio = { version = "1.40", features = ["rt-multi-thread", "net", "io-util", "sync", "signal", "time", "fs", "macros"] }
# Zero-copy byte buffers (Bytes implements Serialize/Deserialize with serde feature)
bytes = { version = "1", features = ["serde"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Error handling
thiserror = "2.0"
anyhow = "1.0"
# Audio synthesis (OPTIONAL - requires ALSA libraries on Linux)
# Enable with feature: native-audio
# Install with: sudo apt-get install -y libasound2-dev pkg-config
# NOTE: These are NOT workspace dependencies because they're optional
# Each crate that needs them must declare them as optional local dependencies
rand = "0.8" # Stay on 0.8 until a deliberate workspace migration to 0.9+ (API churn vs. benefit)
# Pure Rust audio file generation (no system dependencies)
hound = "3.5"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# UI Framework (egui)
# x11 + wayland: explicit backend selection (eframe default-features=false strips them).
# Required for musl/plasmidBin: winit needs platform backends to resolve the event loop.
eframe = { version = "0.29", default-features = false, features = [
"default_fonts",
"glow",
"persistence",
"x11",
"wayland",
] }
egui = "0.29"
egui_extras = "0.29"
# Direct dep for platform extension traits (EventLoopBuilderExtX11::with_any_thread).
# Version must match eframe 0.29's transitive winit — no new crate added.
winit = { version = "0.30", default-features = false }
# Graph visualization
egui_plot = "0.29"
# HTTP client — thin hyper wrapper for local IPC (biomeOS, discovery).
# TLS is delegated to Songbird via tower atomic IPC — petalTongue never owns a TLS stack.
# hyper/hyper-util/http/http-body-util are already transitive from axum; declaring them
# as workspace deps adds zero new crates to the lockfile.
hyper = { version = "1", features = ["client", "http1"] }
hyper-util = { version = "0.1", features = ["client-legacy", "http1", "tokio"] }
http-body-util = "0.1"
http = "1"
base64 = "0.22"
# Pure Rust syscalls — replaces libc for safe system calls
rustix = { version = "0.38", default-features = false }
# Cryptographic hashing — pure Rust (no cc/asm build deps)
blake3 = { version = "1", default-features = false, features = ["pure"] }
# Time and dates — clock + serde only; oldtime/alloc/std pulled by default are unused
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
# UUIDs for graph node IDs, session IDs
uuid = { version = "1.9", features = ["v4", "serde"] }
# Pure-Rust WebSocket for Collaborative Intelligence streams
tokio-tungstenite = "0.21"
# Property testing
proptest = "1.4"
# RPC frameworks for inter-primal communication
# Per IPC Protocol v3.1: JSON-RPC 2.0 REQUIRED, tarpc MAY for Rust-to-Rust hot paths
tarpc = { version = "0.34", features = ["serde1", "tokio1", "serde-transport", "serde-transport-bincode", "unix"] }
# CLI argument parsing
clap = { version = "4.5", features = ["derive", "env"] }
tokio-util = { version = "0.7", features = ["codec"] }
tokio-serde = "0.8" # Must match tarpc's version
bincode = "1.3"
# Terminal / TUI shared
crossterm = "0.29"
terminal_size = "0.4"
ratatui = "0.30"
dashmap = "6.1"
# Async utilities
futures-util = "0.3"
# Graphics / rendering shared
tiny-skia = "0.11"
epaint = { version = "0.29", default-features = false }
png = "0.17"
svg = "0.14"
# Data structures
indexmap = "2.0"
lru = "0.16"
# Network / discovery
socket2 = "0.6"
# Markdown rendering (pure Rust — notebook cell rendering)
pulldown-cmark = { version = "0.13", default-features = false, features = ["html"] }
# Serialization (extended)
ron = "0.8"
# CLI utilities
colored = "2.1"
# Audio decoding
symphonia = { version = "0.5", default-features = false }
# Testing
tempfile = "3.10"
temp-env = { version = "0.3", features = ["async_closure"] }
tokio-test = "0.4"
wiremock = "0.6"
assert_cmd = "2.2"
predicates = "3.0"
criterion = { version = "0.5", features = ["html_reports"] }
# Web server (axum stack — only root binary uses these)
axum = { version = "0.7", features = ["tokio"] }
tower-http = { version = "0.5", features = ["fs", "trace", "cors", "compression-gzip", "compression-br"] }
tower = { version = "0.5", features = ["util"] }
tokio-stream = { version = "0.1", features = ["sync"] }
# Entropy / encryption
aes-gcm = "0.10"
chacha20poly1305 = "0.10"
hkdf = "0.12"
sha2 = "0.10"
zeroize = { version = "1", features = ["derive"] }
[workspace.lints.rust]
unsafe_code = "forbid"
missing_docs = "warn"
# Native `async fn` in traits is intentional; explicit `impl Future + Send` in traits
# was removed project-wide in favor of readable async signatures (see engine `render_multi`).
async_fn_in_trait = "allow"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
module_name_repetitions = "allow"
# Precision loss (usize->f64, u32->f32) is ubiquitous in visualization math
# and safe for data sizes under 2^52. Targeted for local #[expect] evolution.
cast_precision_loss = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
similar_names = "allow"
wildcard_imports = "warn"
doc_markdown = "allow"
default_trait_access = "allow"
wildcard_in_or_patterns = "allow"
items_after_statements = "allow"
# Nursery: significant_drop_tightening produces false positives in test code
# and is overly aggressive with RwLock guard patterns that are intentional.
significant_drop_tightening = "allow"
# Nursery: future_not_send is expected for egui-driven async code that
# uses non-Send types (egui::Context, etc.) in single-threaded UI loops.
future_not_send = "allow"
# Visualization math uses f32/f64 comparisons with epsilon checks.
float_cmp = "allow"
# Methods take &self for API consistency/future evolution even when not used yet.
unused_self = "allow"
trivially_copy_pass_by_ref = "allow"
# Suboptimal flops (mul_add) - allow but evolve via local #[expect].
suboptimal_flops = "allow"
# needless_collect false positives on iterator patterns used for clarity.
needless_collect = "allow"
# mut ref not used mutably: pattern used for future API evolution, and
# some egui &mut callbacks require it structurally.
needless_pass_by_ref_mut = "allow"
# Float-comparison while loops are intentional in animation/interpolation.
while_float = "allow"
# Tuple-to-array: these patterns are used for egui Pos2/Vec2 conversions.
tuple_array_conversions = "allow"
# UniBin dependencies (added for main.rs)
[dependencies]
# Core crates
petal-tongue-core = { path = "crates/petal-tongue-core" }
petal-tongue-discovery = { path = "crates/petal-tongue-discovery" }
petal-tongue-ui-core = { path = "crates/petal-tongue-ui-core" }
petal-tongue-graph = { path = "crates/petal-tongue-graph" }
petal-tongue-ipc = { path = "crates/petal-tongue-ipc" }
# Optional UI (can be disabled for minimal build)
petal-tongue-ui = { path = "crates/petal-tongue-ui", optional = true }
petal-tongue-tui = { path = "crates/petal-tongue-tui" }
eframe = { workspace = true, optional = true }
egui = { workspace = true, optional = true }
winit = { workspace = true, optional = true }
# Web server
axum = { workspace = true }
tower-http = { workspace = true }
tower = { workspace = true }
# Async runtime
tokio = { workspace = true }
tokio-stream = { workspace = true }
# CLI
clap = { workspace = true }
# Serialization
serde = { workspace = true }
serde_json = { workspace = true }
base64 = { workspace = true }
# Markdown rendering (notebook cells)
pulldown-cmark = { workspace = true }
# Error handling (thiserror for typed errors; anyhow eliminated from production)
thiserror = { workspace = true }
# Logging
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
# Scene engine (for examples and future integration)
petal-tongue-scene = { path = "crates/petal-tongue-scene" }
# Examples dependencies (optional, not in production)
# framebuffer_demo uses rustix (via petal-tongue-core)
png = { workspace = true, optional = true }
[dev-dependencies]
anyhow = { workspace = true }
petal-tongue-core = { path = "crates/petal-tongue-core", features = ["test-fixtures"] }
tempfile = { workspace = true }
criterion = { workspace = true }
[[bench]]
name = "grammar_compiler"
harness = false
[features]
default = ["ui"]
# PT-12: eframe/egui/glow (OpenGL/Vulkan) only pulled in by the `ui` feature.
# Build without --features ui (or --no-default-features) for a server/headless
# binary with zero native display dependencies (ecoBin clean path).
ui = ["petal-tongue-ui", "dep:eframe", "dep:egui", "dep:winit"]
examples = ["png"]
[[example]]
name = "awakening_pure_rust"
required-features = ["ui"]
[[example]]
name = "framebuffer_demo"
required-features = ["ui", "examples"]
[[example]]
name = "display_demo"
required-features = ["ui"]
[[example]]
name = "pixel_renderer_demo"
required-features = ["ui", "examples"]
[[example]]
name = "pure_rust_gui_demo"
required-features = ["ui"]
[[example]]
name = "field_mode_demo"
[[example]]
name = "scene_engine_demo"