-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCargo.toml
More file actions
252 lines (226 loc) · 8.98 KB
/
Copy pathCargo.toml
File metadata and controls
252 lines (226 loc) · 8.98 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
[workspace]
resolver = "2"
members = [
"crates/blinc_app",
"crates/blinc_cli",
"crates/blinc_core",
"crates/blinc_animation",
"crates/blinc_image",
"crates/blinc_layout",
"crates/blinc_gpu",
"crates/blinc_macros",
"crates/blinc_dsl_macro",
"crates/blinc_paint",
"crates/blinc_platform",
"crates/blinc_recorder",
"crates/blinc_text",
"crates/blinc_svg",
"crates/blinc_theme",
"crates/blinc_cn",
"crates/blinc_cn_dsl",
"crates/blinc_icons",
"crates/blinc_tabler_icons",
"crates/blinc_debugger",
"crates/blinc_router",
"crates/blinc_media",
"crates/blinc_runtime",
"crates/blinc_test_suite",
# Blinc DSL — Zyntax-embedding crate, behind risk-reduction
# prototype. See ROADMAP §3 for the staged plan.
"crates/blinc_dsl_core",
"extensions/blinc_platform_desktop",
"extensions/blinc_platform_android",
"extensions/blinc_platform_ios",
"extensions/blinc_platform_harmony",
"extensions/blinc_platform_web",
"examples/web_hello",
"examples/web_scroll",
"examples/web_drag",
"examples/web_assets",
"examples/web_mobile_demo",
"examples/web_typography",
"examples/web_text_widgets",
"examples/web_text_position",
# Cross-target desktop examples (was crates/blinc_app/examples/*).
# Separate crate so its 35MB of assets (videos, 3D models, HDRIs)
# don't bloat the published blinc_app package.
"examples/blinc_app_examples",
# Auto-generated wasm wrappers from `tools/build-web-examples`.
# Gitignored; the glob tolerates an empty match on fresh checkouts.
"examples/_generated/*",
# Codegen tools below are not in `default-members` — invoke via
# `cargo run -p <name>`.
"tools/build-web-examples",
"tools/blinc-regression",
"tools/emoji-scan",
# Drop-in NotoColorEmoji fallback that auto-registers with
# `blinc_text` via `#[ctor]`. Opt-in by the consumer app.
"crates/blinc_noto_emoji",
# Sibling: Noto Sans / Noto Sans Math subsets for monochrome
# symbols `blinc_noto_emoji` doesn't carry.
"crates/blinc_noto_symbols",
]
# Colocated downstream packages are gitignored (see .gitignore) and have
# their own upstream repos. Exclude their directory from this workspace so
# their Cargo.toml files don't get implicitly picked up if someone creates
# them as a workspace-style project.
exclude = [
"packages/*",
"packages",
# Scaffold template for `blinc new` — this is a source template with
# `{{project_name}}` placeholders, not a real crate. Cargo picks it
# up when resolving git-fetched copies of this repo (blinc_gltf etc.
# declare Blinc deps by git URL, and cargo scans every Cargo.toml
# in the fetched tree) and chokes on the placeholder package name.
"toolchain/templates",
"toolchain/templates/rust",
]
# Platform-specific crates are included but have target-gated dependencies
# Build for Android: source scripts/android-env.sh && cargo build --target aarch64-linux-android -p blinc_platform_android
# Build for iOS: cargo build --target aarch64-apple-ios -p blinc_platform_ios
[workspace.package]
version = "0.5.1"
edition = "2024"
license = "Apache-2.0"
repository = "https://github.com/project-blinc/Blinc"
rust-version = "1.85"
[workspace.dependencies]
# Krio (async runtime) — mirror the rev Zyntax's `krio_adapter` pins
# to (zyntax/crates/passes/krio_adapter/Cargo.toml). Cargo's `[patch]`
# rejects same-URL+same-rev redirects, so the workspace-deps line is
# the operative pin. Bump all three together when Zyntax does.
krio-async = { git = "https://github.com/darmie/krio.git", rev = "fe0177c" }
krio-stackless = { git = "https://github.com/darmie/krio.git", rev = "fe0177c" }
krio-core = { git = "https://github.com/darmie/krio.git", rev = "fe0177c" }
# GPU rendering — wgpu 26.x for the PowerVR Tensor G5 SDF-pipeline
# fix (23 hits "Parent device is lost"). 27/28/29 carry their own
# regressions. wgpu-hal pinned to 26.0.5 to avoid `wgpu#8420`'s
# `vkAcquireNextImage` fence-wait that regresses acquire p99 156×
# on Mesa (wgpu#9559) — see `gotcha-wgpu-hal-26-0-6-acquire-regression`
# for the full story. `blinc_gpu` declares `wgpu-hal.workspace = true`
# so the pin propagates without any source import.
wgpu = "=26.0.1"
wgpu-hal = "=26.0.5"
naga = "=26.0.0"
# `gpu-alloc 0.6.1` was published as a patch but introduces a
# breaking `AsRef<MD>` bound on `GpuAllocator::{alloc,dealloc,cleanup}`
# that `wgpu-hal 26.0.5` (authored against 0.6.0) does not satisfy.
# Pin to `=0.6.0` so cargo's unification can't pick up the broken
# patch when the [patch] block is stripped on CI and re-resolution
# happens. `blinc_gpu` declares `gpu-alloc.workspace = true` so the
# pin propagates without any source import.
gpu-alloc = "=0.6.0"
bytemuck = { version = "1.14", features = ["derive"] }
# Layout engine
taffy = { version = "0.6", features = ["content_size"] }
# Windowing
winit = "0.30"
raw-window-handle = "0.6"
# Platform: Android
ndk = "0.9"
android-activity = { version = "0.6", features = ["native-activity"] }
jni = "0.21"
# Platform: iOS
objc2 = "0.6.3"
objc2-foundation = { version = "0.3.2", features = ["NSBundle", "NSString", "NSPathUtilities"] }
objc2-ui-kit = { version = "0.3.2", features = ["UIScreen", "UIWindow", "UIView", "UIApplication", "UIResponder"] }
objc2-metal = "0.3.2"
# Async runtime
tokio = { version = "1.35", features = ["rt-multi-thread", "sync", "time"] }
pollster = "0.4"
# Utilities
thiserror = "2.0"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Data structures
slotmap = { version = "1.0", features = ["serde"] }
smallvec = { version = "1.11", features = ["serde"] }
rustc-hash = "2.0"
indexmap = "2.7"
lru = "0.12"
# Regex for syntax highlighting
regex = "1.10"
# Path tessellation
lyon = "1.0"
# Text rendering
ttf-parser = "0.25"
rustybuzz = "0.20"
unicode-bidi = "0.3"
unicode-linebreak = "0.1"
fontdb = "0.22"
# Image processing (for glyph atlas)
image = { version = "0.25", default-features = false, features = ["png"] }
# SVG parsing
usvg = "0.44"
# CLI
clap = { version = "4.4", features = ["derive"] }
# Hot reload / file watching
notify = "7.0"
# Testing
criterion = "0.5"
[profile.dev]
opt-level = 1
# Constrained-machine friendly (e.g. 8 GB RAM / small SSD). Full DWARF is
# a large share of target/ and a major driver of peak LINKER memory — the
# thing that OOMs low-RAM builds. Keep line-table backtraces (file:line
# still resolves) for workspace crates and drop debuginfo from
# dependencies entirely (you rarely step into them). This shrinks target/
# substantially and lowers link-time RAM with no effect on your own
# backtraces. See the "Building on low-resource machines" README section
# for the per-machine knobs (parallel jobs, faster linker).
debug = "line-tables-only"
# Dependencies: no debuginfo at all. Compiled once and cached; the bulk of
# the debug-build disk + link-RAM savings comes from here.
[profile.dev.package."*"]
debug = false
[profile.release]
lto = "thin"
codegen-units = 1
strip = true
[profile.release-debug]
inherits = "release"
debug = true
strip = false
# Optimized for small binary size (mobile platforms)
[profile.release-small]
inherits = "release"
lto = "fat"
opt-level = "z"
panic = "abort"
strip = "symbols"
# Path-patch for downstream `/packages/blinc_*` crates so their
# pinned git deps on `Blinc.git` (blinc_core / blinc_layout /
# blinc_gpu / etc.) resolve back to this workspace's `crates/*`
# tree. The crates always exist on every checkout — including CI —
# so this block stays active everywhere.
#
# `blinc_gpu` is patched here too: without it, pinned `packages/*`
# would compile their own GPU code against the local `blinc_core`,
# breaking exhaustive matches on any new `BuiltinVar` / `ClipShape`
# variant.
[patch."https://github.com/project-blinc/Blinc.git"]
blinc_core = { path = "crates/blinc_core" }
# blinc_animation patched too — `/packages/blinc_node_editor` needs
# `TickCallbackId` for its viewport-tween scheduler hook and pulls
# the crate via the git URL. Without this redirect, the editor's
# blinc_animation resolves to a separate copy from the one
# blinc_layout transitively links, producing the "multiple
# different versions of crate blinc_animation" type mismatch on
# TickCallbackId.
blinc_animation = { path = "crates/blinc_animation" }
blinc_layout = { path = "crates/blinc_layout" }
blinc_platform = { path = "crates/blinc_platform" }
blinc_gpu = { path = "crates/blinc_gpu" }
# blinc_theme is patched too — downstream `/packages/` crates pin
# `blinc_theme` at a git rev that predates the `ShapeTokens` + shadow-
# stack work. Without this entry the path-dep'd downstream gets the
# stale git copy and rejects calls into the new API surface.
blinc_theme = { path = "crates/blinc_theme" }
# blinc_svg patched too — downstream packages pull it transitively
# for SvgDocument / Path conversion; without this they'd resolve to
# the pinned git rev.
blinc_svg = { path = "crates/blinc_svg" }