-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCargo.toml
More file actions
358 lines (285 loc) · 10.3 KB
/
Copy pathCargo.toml
File metadata and controls
358 lines (285 loc) · 10.3 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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# AuroraView Workspace
# Rust-powered WebView for Python apps & DCC embedding
[workspace]
members = [
"crates/auroraview-core",
"crates/auroraview-cli",
"crates/auroraview-desktop",
"crates/auroraview-dcc",
"crates/auroraview-plugins",
"crates/auroraview-plugins/core",
"crates/auroraview-plugins/fs",
"crates/auroraview-browser",
# Independent feature crates
"crates/auroraview-tabs",
"crates/auroraview-bookmarks",
"crates/auroraview-history",
"crates/auroraview-devtools",
# Testing framework
"crates/auroraview-testing",
# Optional feature crates
"crates/auroraview-downloads",
"crates/auroraview-settings",
"crates/auroraview-notifications",
# AI Agent integration
"crates/auroraview-ai-agent",
# MCP Server (Model Context Protocol)
"crates/auroraview-mcp",
# UE integration (Unreal Engine)
"crates/auroraview-ue",
# Frontend assets (Vite build)
"crates/auroraview-assets",
# Migrated from submodules to crates
"crates/auroraview-extensions",
"crates/auroraview-signals",
"crates/auroraview-protect",
"crates/auroraview-pack",
# Telemetry (OpenTelemetry-based observability)
"crates/auroraview-telemetry",
# Workspace dependency unification
"crates/auroraview-workspace-hack",
]
resolver = "2"
[workspace.package]
version = "0.5.10" # x-release-please-version
edition = "2021"
# home 0.5.12+ requires Rust 1.88+, using 1.90 (current stable)
rust-version = "1.90"
authors = ["Hal Long <hal.long@outlook.com>"]
license = "MIT"
repository = "https://github.com/loonghao/auroraview"
[workspace.dependencies]
wry = "0.54.4"
tao = "0.34.6"
# Root package - Core library with optional Python bindings
[package]
name = "auroraview"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "AuroraView: Rust-powered WebView for Python apps & DCC embedding"
keywords = ["webview", "rust", "python", "wry", "pyo3", "dcc"]
categories = ["gui", "multimedia", "graphics"]
[lib]
name = "_core"
crate-type = ["cdylib", "rlib"]
[dependencies]
# Core library (with wry-builder for shared WebView building logic)
auroraview-core = { path = "crates/auroraview-core", features = ["wry-builder"] }
# Signal system (Qt-style signals/slots)
# Python bindings enabled via python-bindings feature
auroraview-signals = { path = "crates/auroraview-signals" }
# Testing framework (AI-friendly CDP-based testing)
# Python bindings enabled via testing-python feature
auroraview-testing = { path = "crates/auroraview-testing", optional = true }
# Telemetry (OpenTelemetry-based observability)
# Python bindings enabled via telemetry-python feature
auroraview-telemetry = { path = "crates/auroraview-telemetry", optional = true }
# Optional feature crates (RFC 0007 Phase 4)
auroraview-tabs = { path = "crates/auroraview-tabs", optional = true }
auroraview-bookmarks = { path = "crates/auroraview-bookmarks", optional = true }
auroraview-history = { path = "crates/auroraview-history", optional = true }
auroraview-downloads = { path = "crates/auroraview-downloads", optional = true }
auroraview-settings = { path = "crates/auroraview-settings", optional = true }
auroraview-notifications = { path = "crates/auroraview-notifications", optional = true }
auroraview-devtools = { path = "crates/auroraview-devtools", optional = true }
# Runtime crates (Desktop and DCC modes)
auroraview-desktop = { path = "crates/auroraview-desktop", optional = true }
auroraview-dcc = { path = "crates/auroraview-dcc", optional = true }
# PyO3 for Python bindings (optional)
# multiple-pymethods: Allow splitting #[pymethods] across multiple files
# Note: abi3 feature is controlled separately via features section
pyo3 = { version = "0.27.2", features = ["multiple-pymethods"], optional = true }
pythonize = { version = "0.27", optional = true }
# Wry for WebView
wry = { workspace = true }
tao = { workspace = true }
# Window handle for DCC integration
raw-window-handle = "0.6"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
simd-json = "0.17"
# Async runtime
tokio = { version = "1.48", features = ["rt-multi-thread", "sync", "time", "macros"] }
# Signal handling (Ctrl+C)
ctrlc = "3.4"
# System tray support
tray-icon = "0.21"
muda = "0.17"
# Error handling
anyhow = "1.0"
thiserror = "2.0"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# URL handling
url = "2.5"
# Path normalization
path-clean = "1.0"
# MIME type detection
mime_guess = "2.0"
# Thread safety
parking_lot = "0.12"
# Directory paths
dirs = "6.0"
# Resource cleanup
scopeguard = "1.2"
# IPC communication
crossbeam-channel = "0.5"
dashmap = "6.1"
ipc-channel = { version = "0.20", optional = true }
ipckit = "0.1"
# File dialogs
rfd = "0.17"
# Open URLs/files in system default application
open = "5.3"
# Image processing for window icon (minimal features for PNG loading)
image = { version = "0.25", default-features = false, features = ["png"] }
# Service discovery
mdns-sd = "0.17"
# Template engine for JS code generation
askama = { version = "0.15", optional = true }
# Regex for URL handling
regex = { version = "1.11", optional = true }
urlencoding = { version = "2.1", optional = true }
# Embed static assets
rust-embed = { version = "8.5", optional = true }
auroraview-workspace-hack = { version = "0.1", path = "crates/auroraview-workspace-hack" }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.62", features = [
# Core types & error codes (HWND, HRESULT, CO_E_*, RPC_E_*)
"Win32_Foundation",
# Window/message APIs (PeekMessageW, SetWindowPos, GetParent, ...)
"Win32_UI_WindowsAndMessaging",
# COM apartment / CoWaitForMultipleHandles for the WebView2 STA pump
"Win32_System_Com",
# GDI brush / class background (set_window_class_dark_background)
"Win32_Graphics_Gdi",
# GetModuleHandle (used by class registration)
"Win32_System_LibraryLoader",
# CreateEventW / threading primitives (recv_with_pump dummy handle)
"Win32_System_Threading",
# Required transitively by `CreateEventW`'s `SECURITY_ATTRIBUTES`
# parameter (even when `None` is passed).
"Win32_Security",
] }
winapi = "0.3.9"
webview2 = { version = "0.1.4", optional = true }
webview2-com = { version = "0.39", optional = true }
[dev-dependencies]
criterion = "0.8"
tempfile = "3.14"
rstest = "0.26"
auroraview-mcp = { path = "crates/auroraview-mcp" }
test-case = "3.3"
proptest = "1.11"
mockall = "0.14"
serial_test = "3.2"
reqwest = { version = "0.13", features = ["json"] }
# Snapshot testing (serialize-based golden file testing)
insta = { version = "1.42", features = ["json", "redactions"] }
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[profile.dev]
opt-level = 0
[features]
# Default: Core features without Python bindings (for CLI usage)
default = ["templates", "url-utils"]
# Python bindings (for Python wheel)
python-bindings = ["pyo3", "url-utils", "auroraview-signals/python", "telemetry-python", "sentry-python"]
# Testing framework Python bindings
testing-python = ["dep:auroraview-testing", "auroraview-testing/python"]
# Telemetry Python bindings
telemetry-python = ["dep:auroraview-telemetry", "auroraview-telemetry/python"]
# Sentry support via Rust SDK (no extra Python runtime dependency)
sentry-python = ["telemetry-python", "auroraview-telemetry/sentry"]
# ABI3 stable ABI for Python 3.8+ (single wheel for all Python 3.8+ versions)
# For Python 3.7, use python-bindings without this feature
abi3-py38 = ["pyo3/abi3-py38"]
# Enable PyO3 auto-initialize in test builds
test-helpers = ["pyo3/auto-initialize"]
# Build as a true Python extension module (for wheels)
ext-module = ["pyo3/extension-module"]
# Rendering backend
win-webview2 = ["dep:webview2"]
# IPC backend
process-ipc = ["ipc-channel"]
# Templates for JS generation
templates = ["askama"]
# URL handling utilities
url-utils = ["regex", "urlencoding"]
# Embed static assets
embed-assets = ["rust-embed"]
# Optional feature crates (RFC 0007 Phase 4)
feature-tabs = ["dep:auroraview-tabs"]
feature-bookmarks = ["dep:auroraview-bookmarks"]
feature-history = ["dep:auroraview-history"]
feature-downloads = ["dep:auroraview-downloads"]
feature-settings = ["dep:auroraview-settings"]
feature-notifications = ["dep:auroraview-notifications"]
feature-devtools = ["dep:auroraview-devtools"]
# Runtime mode features
runtime-desktop = ["dep:auroraview-desktop", "dep:pythonize"]
runtime-dcc = ["dep:auroraview-dcc", "dep:pythonize"]
# Feature bundles
features-core = ["feature-tabs", "feature-bookmarks", "feature-history", "feature-devtools"]
features-all = ["features-core", "feature-downloads", "feature-settings", "feature-notifications"]
# Integration tests (in tests/rust/ directory)
[[test]]
name = "protocol_handlers_integration"
path = "tests/rust/protocol_handlers_integration_tests.rs"
[[test]]
name = "standalone_integration"
path = "tests/rust/standalone_integration_tests.rs"
[[test]]
name = "config_integration"
path = "tests/rust/config_integration_tests.rs"
[[test]]
name = "ipc_json_integration"
path = "tests/rust/ipc_json_integration_tests.rs"
[[test]]
name = "ipc_roundtrip_integration"
path = "tests/rust/ipc_roundtrip_integration_tests.rs"
required-features = ["python-bindings"]
[[test]]
name = "lifecycle_integration"
path = "tests/rust/lifecycle_integration_tests.rs"
[[test]]
name = "timer_integration"
path = "tests/rust/timer_integration_tests.rs"
[[test]]
name = "window_utils_integration"
path = "tests/rust/window_utils_integration_tests.rs"
required-features = ["python-bindings"]
[[test]]
name = "protocol_integration"
path = "tests/rust/protocol_integration_tests.rs"
[[test]]
name = "file_protocol_integration"
path = "tests/rust/file_protocol_integration_tests.rs"
[[test]]
name = "ipc_message_queue_integration"
path = "tests/rust/ipc_message_queue_integration_tests.rs"
[[test]]
name = "port_allocator_integration"
path = "tests/rust/port_allocator_integration_tests.rs"
[[test]]
name = "mdns_integration"
path = "tests/rust/mdns_integration_tests.rs"
[[test]]
name = "http_discovery_integration"
path = "tests/rust/http_discovery_integration_tests.rs"
# Benchmarks
[[bench]]
name = "ipc_bench"
harness = false
[[bench]]
name = "registry_bench"
harness = false