-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
324 lines (254 loc) · 8.68 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
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# https://doc.rust-lang.org/cargo/reference/manifest.html
# ==============================================================================
[package]
name = "revela"
description = "A modular user interface abstracted over multiple backends."
version = "0.1.0-wip"
edition = "2021"
rust-version = "1.81.0" # sync with README.md, .github/workflows/check.yml
authors = ["José Luis Cruz <joseluis@andamira.net>"]
repository = "https://github.com/andamira/revela"
documentation = "https://docs.rs/revela"
license = "MIT OR Apache-2.0"
include = [
"/Cargo.toml",
"/README.md",
"/LICENSE-*",
"/src/**/*.rs",
"/src/**/*.md",
]
categories = ["gui", "accesibility", "multimedia", "api-bindings", "no-std::no-alloc"]
keywords = ["terminal"]
publish = true
[features] # 36 (300 max)
# ==============================================================================
# Features are grouped in the following categories:
# - Miscellaneous
# - Environment
# - Platform
# - Modules
# - Safety
# - Nightly
# - Capability
# - Dependencies
#
# Sintax:
# - ["name"]: Normal public-facing features.
# - ["_name"]: Hidden extra capability features.
# - ["__name"]: Hidden miscellaneous features.
#
# Features are in sync with: src/_info/features.md
#* Miscellaneous features *#
# ------------------------------------------------------------------------------
# default = []
__dbg = ["devela/__dbg"] # for debugging purposes, shows enabled features
__notest = [] # allows excluding examples from being tested
#* Environment features *#
# ------------------------------------------------------------------------------
std = [ # enables features that depend on the standard library
"alloc",
"devela/std",
]
alloc = [ # enables features that depend on allocation
"devela/alloc",
]
no_std = [ # enables features incompatible with the standard library
"devela/no_std",
]
#* Platform features *#
# ------------------------------------------------------------------------------
linux = []
web = []
windows = ["crossterm?/windows"]
term = []
#* Modules features *#
# ------------------------------------------------------------------------------
all = [ # enables all the modules and submodules
"audio", "color", "font", "gfx", "ui", "video",
]
audio = []
color = []
font = []
gfx = []
ui = []
video = []
#* Safety features *#
# ------------------------------------------------------------------------------
# IMPROVE: allow to enable separately safety features from devela and revela.
safe = [] # forbids unsafe at the crate level
safest = [ "safe", "devela/safe" ] # forbids unsafe recursively
unsafest = [ "unsafe", "devela/unsafe" ] # enables unsafe recursively
unsafe = [ # enables all the unsafe features at the crate level
"unsafe_array", "unsafe_async", "unsafe_const", "unsafe_hint",
"unsafe_layout", "unsafe_niche", "unsafe_ptr", "unsafe_slice",
"unsafe_str", "unsafe_sync", "unsafe_syscall", "unsafe_thread",
]
# devela's unsafe features (v0.22.0)
unsafe_array = ["devela/unsafe_array"] # faster array initialization, UninitArray.
unsafe_async = ["devela/unsafe_async"] # task_waker_noop, CoroRun.
unsafe_const = ["devela/unsafe_const"] # extra const methods.
unsafe_hint = ["devela/unsafe_hint"] # unreachable_unchecked, assert_unchecked.
unsafe_layout = ["devela/unsafe_layout"] # MemPod, DSTs in the stack, ExtAny::downcast*.
unsafe_niche = ["devela/unsafe_niche"] # unchecked niche constructors.
unsafe_ptr = ["devela/unsafe_ptr"] # Pinned, pop methods without Clone.
unsafe_slice = ["devela/unsafe_slice"] # extra slice methods, avoid bound checks.
unsafe_str = ["devela/unsafe_str"] # unchecked utf-8 char and &str conversions.
unsafe_sync = ["devela/unsafe_sync"] # Send and Sync impls.
unsafe_syscall = ["devela/unsafe_syscall"] # os syscalls.
unsafe_thread = ["devela/unsafe_thread"] # Logging::set_logger_racy, Env::{remove_var, set_var}.
#* Nightly features *#
# ------------------------------------------------------------------------------
nightly = [ # enables nightly features
"devela/nightly",
]
# devela's nightly features (v0.21.0)
nightly_coro= ["devela/nightly_coro"] # coroutines, coroutine_trait, iter_from_coroutine
nightly_doc = ["devela/nightly_doc"] # doc_cfg, doc_notable_trait
nightly_simd = ["devela/nightly_simd"] # portable_simd
nightly_stabilized = ["devela/nightly_stabilized"] # stabilized features to be released soon
#* Capability features *#
# ------------------------------------------------------------------------------
# These features are prefixed with an underscore (_) and therefore semi-hidden.
# The most complete versions of the documentation:
_docsrs_stable = ["std", "unsafe", "dep_std"]
_docsrs = ["_docsrs_stable", "nightly"]
#* Dependencies features *#
# ------------------------------------------------------------------------------
dep_std = [ # enables all the backends compatible with "std"
"std",
"crossterm", "miniquad", # "notcurses",
# "macroquad", # "notan",
# "libc", "sdl2", "gilrs", "midir", "kira",
]
dep_alloc = [ # enable all the backends compatible with "alloc"
"alloc",
# "no_std", "libc", "tiny-skia",
]
dep_no_std = [ # enable all the backends compatible with "no_std"
"no_std",
# "libc", "tiny-skia",
]
#* features automatically enabled by optional dependencies *#
crossterm = ["dep:crossterm", "std"]
# macroquad = ["dep:macroquad", "std"]
miniquad = ["dep:miniquad"]
# notcurses = ["dep:notcurses"]
# notan = ["dep:notan", "std"]
# sdl2 = ["dep:sdl2", "std", "acolor/sdl2", "raw-window-handle"]
# midir = ["dep:midir", "std", "flume"]
[dependencies]
# ==============================================================================
[dependencies.devela]
# version = "0.21.2"
path = "../devela" # 0.22-wip
default-features = false
# system
# ------------------------------------------------------------------------------
# [dependencies.libc]
# version = "0.2.140"
# optional = true
# default-features = false
# [dependencies.libc-print]
# version = "0.1.21"
# optional = true
# [dependencies.linked_list_allocator]
# version = "0.10.5"
# optional = true
# windowing
# ------------------------------------------------------------------------------
[dependencies.miniquad]
version = "0.4.5"
optional = true
default-features = false
# [dependencies.macroquad]
# version = "0.4.5"
# optional = true
# default-features = false
# [dependencies.notan]
# version = "0.12.0"
# optional = true
# default-features = false
# [dependencies.raw-window-handle]
# version = "0.5.0" # latest = 0.6.0, in sdl2: 0.5.0
# optional = true
# [dependencies.sdl2]
# version = "0.36.2"
# optional = true
# default-features = false
# features = ["raw-window-handle", "gfx"]
# graphics
# ------------------------------------------------------------------------------
# [dependencies.png] # needs-std
# version = "0.17.8"
# optional = true
# [dependencies.tiny-skia]
# version = "0.11.1"
# optional = true
# default-features = false
# terminal
# ------------------------------------------------------------------------------
[dependencies.crossterm]
version = "0.27.0"
optional = true
default-features = false
features = ["events", "bracketed-paste"]
# [dependencies.notcurses]
# version = "3.5.0"
# path = "../../notcurses/notcurses-rs"
# optional = true
# default-features = false
# gamepads
# ------------------------------------------------------------------------------
# [dependencies.gilrs]
# version = "0.10.2"
# default-features = false
# audio
# ------------------------------------------------------------------------------
# [dependencies.kira]
# version = "0.8.4"
# optional = true
# default-features = false
# midi
# ------------------------------------------------------------------------------
# [dependencies.midir]
# version = "0.9.1"
# optional = true
# default-features = false
# [dependencies.flume]
# version = "0.11.0"
# optional = true
# default-features = false
# [dependencies.midi-convert]
# version = "0.1.3" # TODO 0.2.0
# default-features = false
[dev-dependencies]
# ------------------------------------------------------------------------------
[package.metadata.docs.rs]
# ------------------------------------------------------------------------------
no-default-features = true
features = ["_docsrs"]
[badges]
# ------------------------------------------------------------------------------
maintenance = { status = "experimental" }
# profiles
# ==============================================================================
[profile.dev]
split-debuginfo = "packed"
[profile.release]
strip = "debuginfo"
[profile.no_std]
inherits = "dev"
lto = true
opt-level = "s" # "z"
panic = "abort"
# overflow-checks = true
# debug-assertions = true
[profile.no_std-release]
inherits = "release"
lto = true
opt-level = "s" # "z"
panic = "abort"
codegen-units = 1
strip = true
# overflow-checks = false
# debug-assertions = false