forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
173 lines (154 loc) · 8.15 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
[workspace]
members = ["./crates/*"]
resolver = "2"
[workspace.package]
edition = "2021"
homepage = "https://rolldown.rs/"
license = "MIT"
repository = "https://github.com/rolldown/rolldown"
[profile.release-debug]
debug = true
inherits = "release"
[profile.release-wasi]
codegen-units = 16
debug = 'full'
inherits = "release"
lto = "thin"
opt-level = "z"
strip = "none"
[workspace.lints.rust]
[workspace.lints.clippy]
# Guidelines
# - We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
# - Group are enabled with priority -1, so we could easily override some specific rules.
# - https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section
# --- restriction https://doc.rust-lang.org/clippy/usage.html#clippyrestriction
dbg_macro = "deny"
print_stdout = "deny"
# I like the explicitness of this rule as it removes confusion around `clone`.
# This increases readability, avoids `clone` mindlessly and heap allocating on accident.
clone_on_ref_ptr = "deny"
empty_drop = "deny"
exit = "deny"
filetype_is_file = "deny"
get_unwrap = "deny"
rc_buffer = "deny"
rc_mutex = "deny"
rest_pat_in_fully_bound_structs = "deny"
unnecessary_safety_comment = "deny"
# --- pedantic #https://doc.rust-lang.org/clippy/usage.html#clippypedantic
# To write the best rust code, pedantic group is enabled by default.
pedantic = { level = "deny", priority = -1 }
# Wizards, naming is too hard.
module_inception = "allow"
module_name_repetitions = "allow"
similar_names = "allow"
# Forwarding `Result` is a common pattern, this rule is too pedantic.
missing_errors_doc = "allow"
# #[must_use] is creating too much noise for this codebase, it does not add much value except nagging
# the programmer to add a #[must_use] after clippy has been run.
# Having #[must_use] everywhere also hinders readability.
must_use_candidate = "allow"
doc_markdown = "allow"
missing_const_for_fn = "allow"
needless_for_each = "allow"
new_without_default = "allow"
# TODO: should review this rule.
missing_panics_doc = "allow"
# Order doesn't really matter https://rust-lang.github.io/rust-clippy/master/index.html#/inconsistent_struct_constructor
inconsistent_struct_constructor = "allow"
# Single match is equally readable as if/else. https://rust-lang.github.io/rust-clippy/master/index.html#/single_match
single_match = "allow"
single_match_else = "allow"
[workspace.dependencies]
rolldown = { version = "0.1.0", path = "./crates/rolldown" }
rolldown_common = { version = "0.1.0", path = "./crates/rolldown_common" }
rolldown_ecmascript = { version = "0.1.0", path = "./crates/rolldown_ecmascript" }
rolldown_error = { version = "0.1.0", path = "./crates/rolldown_error" }
rolldown_fs = { version = "0.1.0", path = "./crates/rolldown_fs" }
rolldown_loader_utils = { version = "0.1.0", path = "./crates/rolldown_loader_utils" }
rolldown_plugin = { version = "0.1.0", path = "./crates/rolldown_plugin" }
rolldown_plugin_alias = { version = "0.1.0", path = "./crates/rolldown_plugin_alias/" }
rolldown_plugin_build_import_analysis = { version = "0.1.0", path = "./crates/rolldown_plugin_build_import_analysis" }
rolldown_plugin_data_url = { version = "0.1.0", path = "./crates/rolldown_plugin_data_url" }
rolldown_plugin_dynamic_import_vars = { version = "0.0.1", path = "./crates/rolldown_plugin_dynamic_import_vars" }
rolldown_plugin_import_glob = { version = "0.1.0", path = "./crates/rolldown_plugin_import_glob" }
rolldown_plugin_json = { version = "0.1.0", path = "./crates/rolldown_plugin_json" }
rolldown_plugin_load_fallback = { version = "0.1.0", path = "./crates/rolldown_plugin_load_fallback" }
rolldown_plugin_manifest = { version = "0.1.0", path = "./crates/rolldown_plugin_manifest" }
rolldown_plugin_module_preload_polyfill = { version = "0.1.0", path = "./crates/rolldown_plugin_module_preload_polyfill" }
rolldown_plugin_replace = { version = "0.1.0", path = "./crates/rolldown_plugin_replace" }
rolldown_plugin_transform = { version = "0.1.0", path = "./crates/rolldown_plugin_transform" }
rolldown_plugin_wasm_fallback = { version = "0.1.0", path = "./crates/rolldown_plugin_wasm_fallback" }
rolldown_plugin_wasm_helper = { version = "0.1.0", path = "./crates/rolldown_plugin_wasm_helper" }
rolldown_resolver = { version = "0.1.0", path = "./crates/rolldown_resolver" }
rolldown_rstr = { version = "0.1.0", path = "./crates/rolldown_rstr" }
rolldown_sourcemap = { version = "0.1.0", path = "./crates/rolldown_sourcemap" }
rolldown_std_utils = { version = "0.1.0", path = "./crates/rolldown_std_utils" }
rolldown_testing = { version = "0.1.0", path = "./crates/rolldown_testing" }
rolldown_testing_config = { version = "0.1.0", path = "./crates/rolldown_testing_config" }
rolldown_tracing = { version = "0.1.0", path = "./crates/rolldown_tracing" }
rolldown_utils = { version = "0.1.0", path = "./crates/rolldown_utils" }
anyhow = "1.0.86"
append-only-vec = { version = "0.1.5" }
arcstr = "1.2.0"
ariadne = "0.4.1"
async-channel = "2.3.1"
async-scoped = { version = "0.9.0" }
async-trait = "0.1.80"
base64-simd = "0.8.0"
bitflags = { version = "2.6.0" }
daachorse = "1.0.0"
dashmap = "6.0.0"
derivative = "2.2.0"
dunce = "1.0.4" # Normalize Windows paths to the most compatible format, avoiding UNC where possible
futures = "0.3.30"
glob = "0.3.1"
glob-match = "0.2.1"
indexmap = "2.2.6"
infer = "0.16.0"
insta = "1.39.0"
itertools = "0.13.0"
itoa = "1.0.11"
json-strip-comments = "1.0.4"
jsonschema = { version = "0.21.0", default-features = false }
lightningcss = { version = "1.0.0-alpha.57" }
memchr = "2.7.2"
mimalloc = "0.1.42"
mime = "0.3.17"
napi = { version = "3.0.0-alpha", features = ["async", "anyhow"] }
napi-build = { version = "2.1.3" }
napi-derive = { version = "3.0.0-alpha", default-features = false, features = ["type-def"] }
oxc_resolver = { version = "1.11.0" }
phf = "0.11.2"
rayon = "1.10.0"
regex = "1.10.5"
regress = "0.10.0"
rustc-hash = "2.0.0"
schemars = "0.8.21"
self_cell = "1.0.4"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
simdutf8 = { version = "0.1.4", features = ["aarch64_neon"] }
smallvec = "1.13.2"
string_wizard = "0.0.22"
sugar_path = { version = "1.2.0", features = ["cached_current_dir"] }
testing_macros = "0.2.13"
tokio = { version = "1.38.0", default-features = false }
tracing = "0.1.40"
tracing-chrome = "0.7.2"
tracing-subscriber = { version = "0.3.18", default-features = false }
typedmap = "0.5.0"
urlencoding = "2.1.3"
vfs = "0.12.0"
xxhash-rust = "0.8.10"
# oxc crates share the same version
oxc = { version = "0.30.0", features = ["sourcemap_concurrent", "transformer", "minifier", "semantic", "codegen"] }
oxc_index = { version = "0.30.0", features = ["rayon"] }
oxc_transform_napi = { version = "0.30.0" }
[profile.release]
codegen-units = 1
debug = false # Set to `true` for debug information
lto = "fat"
opt-level = 3
strip = "symbols" # Set to `false` for debug information