-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCargo.toml
107 lines (95 loc) · 3.95 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
[package]
name = "rgbds"
version = "0.1.0"
edition = "2021"
rust-version = "1.73" # 1.74 will drop support for older Apple platforms we wish to keep supporting.
description = "The premier Game Boy assembly toolchain"
authors = [ "RGBDS maintainers <[email protected]>" ]
homepage = "http://rgbds.gbdev.io"
repository = "https://github.com/gbdev/rgbds"
license = "MPL-2.0"
keywords = ["rgbds", "gameboy", "asm", "assembly", "gamedev"]
categories = ["command-line-utilities", "development-tools::debugging", "game-development"]
[features]
# People will primarily want to `cargo install` this crate.
default = ["rgbasm", "rgblink", "rgbfix", "rgbgfx"]
rgbasm = [
# CLI.
"dep:clap", "dep:os_info", "dep:codespan-reporting", "dep:shadow-rs", "dep:sysexits",
# Specific deps.
"dep:keyword-trie-gen", "dep:lalrpop", "dep:lalrpop-util", "dep:memmap2", "dep:string-interner", "dep:take_mut", "dep:warnings-gen",
]
rgblink = [
# CLI.
"dep:clap", "dep:os_info", "dep:codespan-reporting", "dep:shadow-rs", "dep:sysexits",
]
rgbfix = [
# CLI.
"dep:clap", "dep:os_info", "dep:codespan-reporting", "dep:shadow-rs", "dep:sysexits",
]
rgbgfx = [
# CLI.
"dep:clap", "dep:os_info", "dep:ariadne", "dep:yansi", "dep:shadow-rs", "dep:sysexits",
# Specific deps.
"dep:arrayvec", "dep:bitvec", "dep:cfg-if", "dep:funty", "dep:plumers",
]
# TODO: move bin-only deps to separate features.
[dependencies] # TODO: audit deps & features
# TODO: use `thiserror` instead
parse-display = { version = "0.6", default-features = false }
try-from-discrim = "1.0"
# The binaries' deps.
ariadne = { version = "0.4", optional = true }
arrayvec = { version = "0.7", optional = true }
bitvec = { version = "1.0", optional = true }
cfg-if = { version = "1.0", optional = true }
clap = { version = "4.4", features = ["derive", "wrap_help"], optional = true }
# TODO: switch to `ariadne` instead.
codespan-reporting = { version = "0.11", optional = true }
funty = { version = "2.0", optional = true }
keyword-trie-gen = { path = "keyword-trie-gen", optional = true }
lalrpop-util = { version = "0.19.9", optional = true }
memmap2 = { version = "0.5", optional = true }
os_info = { version = "3.8", default-features = false, optional = true }
plumers = { version = "1.0", optional = true }
shadow-rs = { version = "0.28", optional = true }
# TODO: maybe use feature `inline-more`
string-interner = { version = "0.14", default-features = false, features = ["std", "backends"], optional = true }
sysexits = { version = "0.8", optional = true }
take_mut = { version = "0.2", optional = true }
warnings-gen = { path = "warnings-gen", optional = true }
yansi = { version = "1.0", features = ["detect-env", "detect-tty", "hyperlink"], optional = true }
[build-dependencies]
lalrpop = { version = "0.19.9", default-features = false, optional = true }
shadow-rs = { version = "0.28", optional = true }
[dev-dependencies]
libtest-mimic = "0.7.2"
snapbox = { version = "0.5.11", features = ["path", "cmd"] }
[[bin]]
name = "rgbasm"
path = "src/asm/main.rs"
required-features = ["rgbasm"]
[[bin]]
name = "rgbgfx"
path = "src/gfx/main.rs"
required-features = ["rgbgfx"]
[[test]]
name = "rgbgfx"
harness = false
required-features = ["rgbgfx"]
[workspace]
members = ["keyword-trie-gen", "warnings-gen"]
# The profile that 'cargo dist' will build with
# NOTE: for extra savings, pass `-Z build-std` to Cargo, and `-Zlocation-deetail=none` to rustc (via RUSTFLAGS or other).
[profile.dist]
inherits = "release"
# NOTE: to enable LTO across programming language boundaries, see the "Linker-plugin-based LTO" chapter
# of the rustc book.
# To ensure LLD is the proper version, consider:
# $ rustup component add llvm-tools
# $ ln -s $(rustup which ../lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld) ld.lld
# $ RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=$PWD/ld.lld -Clink-arg=-flto=thin" ...
lto = "thin"
codegen-units = 1
# This deflates the binaries' size further, but at the cost of no backtraces in crash reports, making them hardly useful.
#panic = "abort"