-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
68 lines (57 loc) · 1.82 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
[package]
name = "editor"
version = "0.0.1"
edition = "2021"
[lib]
name = "editor"
path = "src/lib.rs"
# the "rlib" isn't technically necessary here. "cdylib" is used by WASM stuff,
# and "rlib" would be used by rust programs that depend on this library if there
# were any.
crate-type = ["cdylib", "rlib"]
[dependencies]
aliu = "*"
mint = "0.5.8"
unicode-width = "0.1.7"
lazy_static = "1.4.0"
# Can't use font-rs here because the latest released version has an out-of-bounds
# error; instead we just copy-paste their rasterization code
ttf-parser = { version = "0.13.4", default-features = false, features = [] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
winit = { version = "0.26.0", features = ["mint"] }
glutin = "0.28.0"
# region = "3.0.0" # Virtual memory allocation
[target.'cfg(target_arch = "wasm32")'.dependencies]
wee_alloc = "0.4.5"
js-sys = "0.3.55"
wasm-bindgen = { version = "0.2.78", default-features = false }
console_error_panic_hook = "0.1.7"
winit = { version = "0.26.0", default-features = false, features = ["mint"] }
web-sys.version = "0.3.55"
web-sys.features = [
'Document',
'Element',
'HtmlCanvasElement',
'WebGlBuffer',
'WebGl2RenderingContext',
'WebGlVertexArrayObject',
'WebGlTexture',
'WebGlProgram',
'WebGlShader',
'WebGlUniformLocation',
'Window',
]
[profile.dev]
opt-level = "s"
[profile.release]
opt-level = "z"
panic = "abort"
codegen-units = 1
# For some reason, turning this on reduces the binary size from 1.5 MB to 22 KB.
# I guess Zero-Cost Abstractions are only Zero-Cost if you're a big-brained
# compiler programmer. Otherwise they cost around 1.478 MB.
# - Albert Liu, Dec 06, 2021 Mon 23:08 EST
lto = true
[package.metadata.wasm-pack.profile.release]
# Toggle this to get some extra debug info for size profiling
# wasm-opt = ['-O4', '-g']