mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-18 03:41:52 +03:00
bb6dbb0731
When I added web support in February, it was easier to get started with stdweb, since it has the nice cargo web tool. However, stdweb is unmaintained, winit is deprecating support for it, and the next steps for web (downloading maps dynamically) have better support for web-sys. With Alvin's guidance, I got https://github.com/dabreegster/minimal_websys_winit_glow_demo working first. This PR cuts A/B Street over too. I tested abst and the widgetry demo in both native and web. The only major regression from stdweb is the canvas placement and size. I attempted some fixes, but at this point, I'll leave it as a smaller followup instead.
34 lines
1.1 KiB
TOML
34 lines
1.1 KiB
TOML
[package]
|
|
name = "widgetry"
|
|
version = "0.1.0"
|
|
authors = ["Dustin Carlino <dabreegster@gmail.com>"]
|
|
edition = "2018"
|
|
|
|
[features]
|
|
default = ["glow-backend"]
|
|
glow-backend = ["glow", "glutin", "usvg/text", "usvg/text_native"]
|
|
wasm-backend = ["glow/web-sys", "instant/wasm-bindgen", "usvg/text", "usvg/text_web-sys", "wasm-bindgen", "web-sys", "winit/web-sys"]
|
|
|
|
[dependencies]
|
|
abstutil = { path = "../abstutil" }
|
|
# backtrace = "0.3.40"
|
|
downcast-rs = "1.2.0"
|
|
geom = { path = "../geom" }
|
|
glow = { version = "0.6.0", optional = true, default-features=false }
|
|
glutin = { version = "0.25.0", optional = true }
|
|
htmlescape = "0.3.1"
|
|
image = { version = "0.23.9", default-features = false, features=["png"] }
|
|
instant = "0.1.7"
|
|
log = "0.4.11"
|
|
lru = "0.6.0"
|
|
# lyon 0.16.0 causes crash in widgetry demo
|
|
# maybe related: https://github.com/nical/lyon/issues/607
|
|
lyon = "0.15.8"
|
|
serde = "1.0.116"
|
|
stretch = "0.3.2"
|
|
ttf-parser = "0.8.2"
|
|
usvg = { git = "https://github.com/dabreegster/resvg/", branch = "wasm", default-features=false }
|
|
wasm-bindgen = { version = "0.2.68", optional = true }
|
|
web-sys = { version = "0.3.45", optional = true }
|
|
winit = "0.23.0"
|