-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCargo.toml
More file actions
90 lines (79 loc) · 3.43 KB
/
Copy pathCargo.toml
File metadata and controls
90 lines (79 loc) · 3.43 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
[package]
name = "blinc_gpu"
description = "Blinc GPU renderer - SDF-based rendering via wgpu"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
documentation = "https://docs.rs/blinc_gpu"
rust-version.workspace = true
[lib]
crate-type = ["lib"]
[features]
# No default backends - must be explicitly selected per platform
default = []
vulkan = ["wgpu/vulkan-portability"]
metal = ["wgpu/metal"]
dx12 = ["wgpu/dx12"]
webgl = ["wgpu/webgl"]
webgpu = ["wgpu/webgpu"]
# Platform-specific presets
desktop = ["vulkan", "metal", "dx12", "winit"] # All desktop backends + windowing
android = ["vulkan"] # Android only uses Vulkan (native windowing)
ios = ["metal"] # iOS only uses Metal (native windowing)
fuchsia = ["vulkan"] # Fuchsia uses Vulkan via Scenic (native windowing)
harmony = ["vulkan"] # HarmonyOS prefers Vulkan (native windowing)
web = ["webgpu", "webgl"] # Browser: WebGPU primary, WebGL2 fallback
# Runtime BC1/BC3 texture encoding for 2D images and masks. ~50-150 ms
# encode per 2K × 2K RGBA at load, 4-8× GPU VRAM reduction for the
# image cache. Off by default so the `tbc` dep is opt-in; enable
# unconditionally from the app crate since tbc is pure Rust and
# compiles everywhere Blinc ships.
bc-encode = ["dep:tbc"]
[dependencies]
blinc_core = { path = "../blinc_core", version = "0.5.1" }
blinc_paint = { path = "../blinc_paint", version = "0.5.1" }
blinc_text = { path = "../blinc_text", version = "0.5.1" }
# Optional BC encoder — only pulled in when `bc-encode` is enabled.
# Same pure-Rust crate blinc_gltf uses for mesh-texture compression.
tbc = { version = "0.3", optional = true }
# GPU
wgpu.workspace = true
# Declared but not imported in any module here — the workspace pins
# `wgpu-hal = "=26.0.5"` to keep the resolver off `26.0.6`, which
# regresses `vkAcquireNextImage` latency on Mesa via `wgpu#8420`
# (full rationale in workspace `Cargo.toml`). The constraint only
# propagates if some workspace crate declares wgpu-hal directly;
# blinc_gpu is the natural home since it already owns every other
# wgpu touchpoint.
wgpu-hal.workspace = true
# Declared but not imported here. Workspace pins `gpu-alloc = "=0.6.0"`
# to keep the resolver off `0.6.1`, whose breaking `AsRef<MD>` bound
# on `GpuAllocator::{alloc,dealloc,cleanup}` doesn't satisfy
# `wgpu-hal 26.0.5`. The pin only propagates if some workspace crate
# declares `gpu-alloc` directly; blinc_gpu is the natural home next
# to the wgpu-hal touchpoint above.
gpu-alloc.workspace = true
naga.workspace = true
bytemuck.workspace = true
# Windowing (optional - only needed for desktop)
winit = { workspace = true, optional = true }
raw-window-handle.workspace = true
# Data structures
slotmap.workspace = true
smallvec.workspace = true
lru.workspace = true
# Logging
tracing.workspace = true
# Async
pollster.workspace = true
# Path tessellation
lyon.workspace = true
# Browser-only deps for the `with_canvas` constructor — kept under a
# wasm32 target gate so desktop / mobile builds don't pull `web-sys`
# into their dep trees. The `blinc_platform_web` extension brings these
# in as well; declaring them here is what lets `with_canvas` accept
# `web_sys::HtmlCanvasElement` directly without going through that crate.
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { version = "0.3", features = ["HtmlCanvasElement"] }
wasm-bindgen = "0.2"