-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
76 lines (72 loc) · 3.95 KB
/
Copy pathCargo.toml
File metadata and controls
76 lines (72 loc) · 3.95 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
[package]
name = "shell-core"
version = "0.2.1"
edition = "2021"
license = "MIT"
description = "Shared Tauri app-shell + release-tooling layer for the curator, warden, and lector apps."
repository = "https://github.com/Lockyc/shell-core"
publish = false
# The default feature set is ZERO-dependency on purpose: `build_stamp()` and the embedded release
# scripts (RELEASE_SH/GEN_LATEST_SH/INSTALL_APP_SH) are all a consuming app's `build.rs` needs, and
# a build-dependency must stay light. The Tauri runtime helper (`register_plugins`) lives behind the
# `runtime` feature so it only pulls tauri when used as a normal `[dependencies]` entry. With
# resolver = "2", a consumer's `[build-dependencies]` (default-features = false) and `[dependencies]`
# (features = ["runtime"]) resolve features independently, so the build-dep never drags in tauri.
[features]
default = []
runtime = [
"dep:tauri",
"dep:tauri-plugin-updater",
"dep:tauri-plugin-process",
"dep:serde",
"dep:serde_json",
"dep:notify",
"dep:objc2",
"dep:objc2-app-kit",
"dep:objc2-foundation",
"dep:block2",
]
[dependencies]
# "unstable" is required for `Manager::get_window` — the home surface (src/home.rs) uses it to find
# an already-open home window in `show_home`/`close_home`. It is NOT needed for the window's
# construction: that went through `WebviewWindowBuilder` (stable) once the bare
# `WindowBuilder` + `add_child` shape was removed for being broken on macOS 26 — see `close_home`'s
# doc. Every consumer already carries this feature on its own tauri dependency (their content panes
# do `add_child` a webview per tab), so it costs nothing new downstream.
#
# "macos-private-api" is required for `WebviewWindowBuilder::transparent` (src/detach.rs's
# `open_detached` — the detached window's shell composites over a hole exactly like every app's own
# content windows). Cargo feature unification would cover this for free when shell-core is only
# ever built *inside* a consumer (every app already carries the feature on its own tauri
# dependency, per the note above) — but shell-core must also build and gate-check standalone (`just
# gate` here, `cargo build -p shell-core --features runtime`), with no consumer's Cargo.toml around
# to unify features from, so it has to request it itself.
tauri = { version = "2", features = ["unstable", "macos-private-api"], optional = true }
tauri-plugin-updater = { version = "2", optional = true }
tauri-plugin-process = { version = "2", optional = true }
# Real JSON for the window-geometry store (src/geometry.rs). shell-core hand-rolls JSON for the
# home/detach payloads — a fixed-shape, one-way, escape-only case — but the geometry store must
# *parse* a file it wrote earlier, and hand-rolling a parser to avoid a dep tauri already carries
# would be a worse trade. Optional, so `just zero-dep` stays green.
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
# The shared config-file hot-reload watcher (src/watch.rs), consumed by curator + lector. Same
# major as their own pin so cargo unifies to one `notify` across each app's dependency graph.
notify = { version = "6", optional = true }
# Native macOS bits behind the `runtime` feature: the mouse side-button NSEvent monitor
# (src/mouse_nav.rs) and the content-webview loading bar (src/progress_bar.rs, an NSView overlay on
# the WKWebView driven by estimatedProgress). macOS-only + optional, pulled only by `runtime`, so the
# zero-tauri build-dep never compiles them.
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6", optional = true }
objc2-app-kit = { version = "0.3", features = [
"NSEvent",
"NSResponder",
"NSView",
"NSColor",
], optional = true }
objc2-foundation = { version = "0.3", features = ["NSGeometry"], optional = true }
block2 = { version = "0.6", optional = true }
[dev-dependencies]
# The watch.rs hot-reload test writes a temp config dir and waits for the callback to fire.
tempfile = "3"