forked from QuantumBadger/Speedy2D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
105 lines (86 loc) · 2.42 KB
/
Cargo.toml
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
[package]
name = "speedy2d"
version = "1.3.1"
authors = ["QuantumBadger <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
readme = "README.md"
description = """
Hardware-accelerated drawing of shapes, images, and text, with an easy to use
API. Speedy2D aims to be the simplest Rust API for creating a window, rendering graphics,
and handling input.
"""
keywords = ["opengl", "gamedev", "graphics", "font"]
categories = ["rendering::graphics-api", "game-development", "graphics"]
repository = "https://github.com/QuantumBadger/Speedy2D"
documentation = "https://docs.rs/speedy2d"
[features]
default = ["windowing", "image-loading"]
windowing = ["glutin"]
image-loading = ["image"]
[dependencies]
gl = "0.14"
glow = "0.7"
log = "0.4"
backtrace = "0.3"
rusttype = { version = "0.9" }
unicode-normalization = "0.1"
num-traits = "0.2"
# For image_loading feature
image = { version = "0.23", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# For windowing feature
glutin = { version = "0.26", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2" }
[target.'cfg(any(doc, doctest, target_arch = "wasm32"))'.dependencies.web-sys]
version = "0.3"
features = [
"AddEventListenerOptions",
"CssStyleDeclaration",
"DomRect",
"HtmlCanvasElement",
"KeyboardEvent",
"MediaQueryList",
"MediaQueryListEvent",
"MouseEvent",
"WheelEvent",
"Performance",
"WebGl2RenderingContext",
"Window",
]
# Tests using a headless GL context.
[[test]]
name = "test"
path = "test/main.rs"
harness = false
[dev-dependencies]
simple_logger = { version = "1.11", default-features = false, features = ["colors"] }
image = { version = "0.23" }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
glutin = "0.26"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen = { version = "0.2" }
# Examples: must be listed manually as they require the "windowing" feature.
[[example]]
name = "hello_world"
required-features = ["windowing"]
[[example]]
name = "user_events"
required-features = ["windowing"]
[[example]]
name = "input_callbacks"
required-features = ["windowing"]
[[example]]
name = "animation"
required-features = ["windowing"]
[[example]]
name = "load_image"
required-features = ["windowing", "image-loading"]
[[example]]
name = "mouse_grab"
required-features = ["windowing"]
[workspace]
members = [
"examples/webgl",
]