-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
86 lines (77 loc) · 2.32 KB
/
Copy pathCargo.toml
File metadata and controls
86 lines (77 loc) · 2.32 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
[package]
name = "polymap"
version = "0.1.0"
edition = "2024"
license = "MIT"
description = "3D map renderer powered by WebGPU and Rust/WASM"
repository = "https://github.com/CottageHop/PolyMap"
keywords = ["map", "3d", "webgpu", "wasm", "openstreetmap"]
categories = ["rendering", "wasm", "graphics"]
[lib]
crate-type = ["cdylib", "rlib"]
# Optimize release builds
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
strip = true
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
# Cargo features:
# renderer (default) — full 3D map renderer (wgpu, winit, font handling, GPU code).
# worker — slim build that exposes `process_tile()` for use in a
# Web Worker. Excludes wgpu/winit/fontdue. Build with:
# wasm-pack build --no-default-features --features worker
[features]
default = ["renderer"]
renderer = ["dep:wgpu", "dep:winit", "dep:fontdue"]
worker = []
[dependencies]
bytemuck = { version = "1", features = ["derive"] }
glam = "0.29"
log = "0.4"
serde_json = "1"
earcutr = "0.4"
web-time = "1"
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
# Renderer-only deps — only pulled in when the `renderer` feature is enabled.
wgpu = { version = "24", features = ["webgl"], optional = true }
winit = { version = "0.30", optional = true }
fontdue = { version = "0.9", optional = true }
# Native-only dependencies (used by the native binary in main.rs).
# These are always available on native targets — main.rs is the only consumer
# and won't be built for the worker WASM. On wasm32 these are not present.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
pollster = "0.4"
env_logger = "0.11"
ureq = "2"
[dependencies.serde]
version = "1"
features = ["derive"]
# WASM-only dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1"
console_log = "1"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
serde-wasm-bindgen = "0.6"
web-sys = { version = "0.3", features = [
"AddEventListenerOptions",
"Document",
"DomRect",
"Element",
"EventTarget",
"Headers",
"HtmlCanvasElement",
"MouseEvent",
"Request",
"RequestInit",
"RequestMode",
"Response",
"Touch",
"TouchEvent",
"TouchList",
"WheelEvent",
"Window",
] }
js-sys = "0.3"