-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCargo.toml
More file actions
247 lines (218 loc) · 8.67 KB
/
Cargo.toml
File metadata and controls
247 lines (218 loc) · 8.67 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
[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_paint",
"crates/blinc_platform",
"crates/blinc_recorder",
"crates/blinc_text",
"crates/blinc_svg",
"crates/blinc_theme",
"crates/blinc_cn",
"crates/blinc_icons",
"crates/blinc_tabler_icons",
"crates/blinc_debugger",
"crates/blinc_router",
"crates/blinc_media",
"crates/blinc_runtime",
"crates/blinc_canvas_kit",
"crates/blinc_test_suite",
"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 wrapper crates produced by
# `tools/build-web-examples` from the cross-target examples in
# `examples/blinc_app_examples/examples/`. The directory is gitignored except
# for the .gitignore + .gitkeep marker; the glob below tolerates
# an empty match so a fresh checkout still resolves the workspace
# before the codegen tool has run.
"examples/_generated/*",
# Codegen tool for the generated wrappers above. Not in
# `default-members` — regular `cargo build` does not pull it.
# Run with `cargo run -p blinc-build-web-examples`.
"tools/build-web-examples",
# Scanner that extracts the non-ASCII codepoint set from workspace
# Rust sources. Feeds the emoji font subsetter so Blinc only
# bundles glyphs the application actually uses. Not in
# `default-members`. Run with `cargo run -p blinc-emoji-scan`.
"tools/emoji-scan",
# First entry in the `blinc_<font>_emoji` add-on family: a
# drop-in NotoColorEmoji fallback that auto-registers with
# `blinc_text`'s global font registry via `#[ctor]`. Users add
# it to their own Cargo.toml and get color emoji on wasm / Linux
# / headless hosts with zero source changes. Keeps `blinc_text`
# itself lean — apps that don't need emoji pay nothing.
"crates/blinc_noto_emoji",
# Sibling add-on: drop-in Noto Sans / Noto Sans Math subsets
# covering the monochrome text characters that `blinc_noto_emoji`
# doesn't carry (math operators, double arrows, currency
# symbols, Latin-1 Supplement punctuation). Same register()
# shape, same wiring in blinc_app's web runner. Ships two
# tiny subsets (~6 KB + ~18 KB) generated by
# `scripts/regen-symbols-subset.sh`.
"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 = "2021"
license = "Apache-2.0"
repository = "https://github.com/project-blinc/Blinc"
rust-version = "1.75"
[workspace.dependencies]
# Zyntax integration (disabled until Grammar2/Runtime2 is ready)
# zyntax_embed = { git = "https://github.com/darmie/zyntax" }
# zyntax_zrtl = { git = "https://github.com/darmie/zyntax" }
# GPU rendering
#
# Pinned to wgpu 26.0.1 + wgpu-hal 26.0.6: wgpu 23 hits a "Parent device
# is lost" crash on the Pixel 10 Pro / Tensor G5 PowerVR D-Series Vulkan
# driver (25.1@6794074) during SDF render-pipeline creation. The 26.0.6
# wgpu-hal patch series ships fixes for several PowerVR/Mali pipeline-
# creation issues. Avoiding 27/28/29 because they carry their own
# regressions and we want a stable, known-good base. wgpu-hal is a
# transitive dep — bumping `wgpu = "=26.0.1"` pulls wgpu-hal 26.0.6 via
# its `^26.0` constraint.
wgpu = "=26.0.1"
naga = "=26.0.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
[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"
# Local-dev overrides for the downstream `/packages/blinc_*` crates.
# Each of those packages depends on Blinc through a pinned git rev so
# they remain usable as standalone git deps for outside consumers.
# Inside this Blinc workspace we redirect those git deps back to the
# local crates, so changes to Blinc flow through without having to
# push + bump revs in every package. CI builds that don't have
# `/packages/` checked out skip the patch entirely (the workspace
# resolver only applies patches whose `path` exists).
[patch."https://github.com/project-blinc/Blinc.git"]
blinc_core = { path = "crates/blinc_core" }
blinc_canvas_kit = { path = "crates/blinc_canvas_kit" }
blinc_layout = { path = "crates/blinc_layout" }
blinc_platform = { path = "crates/blinc_platform" }
# Local-dev redirects for the /packages/* downstream repos. While
# editing blinc_gltf / blinc_skeleton / blinc_input locally, every
# reference to their pinned git revs (from examples/Cargo.toml and
# transitively from other downstream repos) resolves to the local
# checkout instead — no push + rev-bump cycle for iteration.
#
# NOTE for CI: these patches require `packages/<crate>/Cargo.toml`
# to exist on disk. The `packages/` directory is gitignored, so CI
# runners that only clone Blinc itself will fail cargo resolution.
# Two ways to handle that when we get back to CI:
# a) Make `packages/*` git submodules; CI clones with
# `--recurse-submodules`.
# b) Add a CI pre-step that strips this block (or a sibling
# `Cargo.ci.toml` with the patches removed) before build.
# The win from local iteration outweighs the CI setup cost.
[patch."https://github.com/project-blinc/blinc_gltf.git"]
blinc_gltf = { path = "packages/blinc_gltf" }
[patch."https://github.com/project-blinc/blinc_skeleton.git"]
blinc_skeleton = { path = "packages/blinc_skeleton" }
[patch."https://github.com/project-blinc/blinc_input.git"]
blinc_input = { path = "packages/blinc_input" }