forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
235 lines (210 loc) · 9.74 KB
/
Copy pathCargo.toml
File metadata and controls
235 lines (210 loc) · 9.74 KB
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
[workspace]
members = ["./crates/*", "tasks/*"]
resolver = "3"
[workspace.package]
edition = "2024"
homepage = "https://rolldown.rs/"
license = "MIT"
repository = "https://github.com/rolldown/rolldown"
[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"
# Though the following are nursery rules, they’re still useful.
debug_assert_with_mut_call = "warn"
iter_on_single_items = "warn"
needless_pass_by_ref_mut = "warn"
redundant_clone = "warn"
redundant_pub_crate = "warn"
significant_drop_in_scrutinee = "warn"
unused_peekable = "warn"
# Rewriting `unwrap_or` to `map_or` requires to annotate type explicitly which is cumbersome
map_unwrap_or = "allow"
[workspace.dependencies]
criterion2 = { version = "3.0.0", default-features = false }
css-module-lexer = "0.0.15"
rolldown = { version = "0.1.0", path = "./crates/rolldown" }
rolldown_common = { version = "0.1.0", path = "./crates/rolldown_common" }
rolldown_debug = { version = "0.1.0", path = "./crates/rolldown_debug" }
rolldown_debug_action = { version = "0.1.0", path = "./crates/rolldown_debug_action" }
rolldown_ecmascript = { version = "0.1.0", path = "./crates/rolldown_ecmascript" }
rolldown_ecmascript_utils = { version = "0.1.0", path = "./crates/rolldown_ecmascript_utils" }
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_asset = { version = "0.1.0", path = "./crates/rolldown_plugin_asset" }
rolldown_plugin_asset_import_meta_url = { version = "0.1.0", path = "./crates/rolldown_plugin_asset_import_meta_url" }
rolldown_plugin_build_import_analysis = { version = "0.1.0", path = "./crates/rolldown_plugin_build_import_analysis" }
rolldown_plugin_data_uri = { version = "0.1.0", path = "./crates/rolldown_plugin_data_uri" }
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_isolated_declaration = { version = "0.1.0", path = "./crates/rolldown_plugin_isolated_declaration" }
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_federation = { version = "0.1.0", path = "./crates/rolldown_plugin_module_federation" }
rolldown_plugin_module_preload_polyfill = { version = "0.1.0", path = "./crates/rolldown_plugin_module_preload_polyfill" }
rolldown_plugin_oxc_runtime = { version = "0.1.0", path = "./crates/rolldown_plugin_oxc_runtime" }
rolldown_plugin_replace = { version = "0.1.0", path = "./crates/rolldown_plugin_replace" }
rolldown_plugin_reporter = { version = "0.1.0", path = "./crates/rolldown_plugin_reporter" }
rolldown_plugin_transform = { version = "0.1.0", path = "./crates/rolldown_plugin_transform" }
rolldown_plugin_utils = { version = "0.1.0", path = "./crates/rolldown_plugin_utils" }
rolldown_plugin_vite_resolve = { version = "0.1.0", path = "./crates/rolldown_plugin_vite_resolve" }
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_plugin_web_worker_post = { version = "0.1.0", path = "./crates/rolldown_plugin_web_worker_post" }
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" }
rolldown_workspace = { version = "0.1.0", path = "./crates/rolldown_workspace" }
anyhow = "1.0.98"
append-only-vec = "0.1.7"
arcstr = { version = "1.2.0", default-features = false }
ariadne = { package = "rolldown-ariadne", version = "0.5.1" }
async-channel = "2.3.1"
async-scoped = "0.9.0"
async-trait = "0.1.88"
base-encode = "0.3.1"
base64-simd = "0.8.0"
bitflags = "2.9.1"
commondir = "1.0.0"
cow-utils = "0.1.3"
dashmap = "6.1.0"
derive_more = { version = "2.0.1", features = ["debug"] }
dunce = "1.0.5" # Normalize Windows paths to the most compatible format, avoiding UNC where possible
fast-glob = "0.4.5"
flate2 = "1.1.1"
form_urlencoded = "1.2.1"
futures = "0.3.31"
glob = "0.3.2"
heck = "0.5.0"
indexmap = "2.9.0"
infer = "0.19.0"
insta = "1.43.1"
itertools = "0.14.0"
itoa = "1.0.15"
json-strip-comments = "1.0.4"
jsonschema = { version = "0.30.0", default-features = false }
memchr = "2.7.4"
mimalloc-safe = "0.1.52"
mime = "0.3.17"
nom = "8.0.0"
notify = "8.0.0"
num-format = "0.4"
petgraph = "0.8.1"
phf = "0.11.3"
rayon = "1.10.0"
regex = "1.11.1"
regress = "0.10.3"
ropey = "1.6.1"
rustc-hash = "2.1.1"
schemars = "0.9.0"
self_cell = "1.2.0"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
simdutf8 = "0.1.5"
smallvec = "1.15.0"
string_wizard = { path = "./crates/string_wizard", features = ["serde"] }
sugar_path = { version = "1.2.0", features = ["cached_current_dir"] }
terminal_size = "0.4.2"
testing_macros = "1.0.0"
tokio = { version = "1.45.0", default-features = false }
tracing = "0.1.41"
tracing-chrome = "0.7.2"
tracing-subscriber = { version = "0.3.19", default-features = false }
ts-rs = "10.1"
typedmap = "0.6.0"
url = "2.5.4"
urlencoding = "2.1.3"
vfs = "0.12.1"
walkdir = "2.5.0"
xxhash-rust = "0.8.15"
prettyplease = "0.2.32"
proc-macro2 = "1"
quote = "1"
syn = { version = "2", default-features = false }
# napi
napi = { version = "3.0.0-beta.1", features = ["async", "anyhow"] }
napi-build = { version = "2.2.0" }
napi-derive = { version = "3.0.0-beta.1", default-features = false, features = ["type-def"] }
# oxc crates with the same version
oxc = { version = "=0.72.2", features = ["ast_visit", "transformer", "minifier", "mangler", "semantic", "codegen", "serialize", "isolated_declarations", "regular_expression", "cfg"] }
oxc_parser_napi = { version = "=0.72.2" }
oxc_transform_napi = { version = "=0.72.2" }
# oxc crates in their own repos
# Versions must be relaxed for usage in oxc.
# Please update with `cargo update oxc_resolver oxc_resolver_napi oxc_sourcemap oxc_index`
oxc_index = { version = "3", features = ["rayon", "serde"] } # https://github.com/oxc-project/oxc-index-vec
oxc_resolver = { version = "11", features = ["package_json_raw_json_api"] } # https://github.com/oxc-project/oxc-resolver
oxc_resolver_napi = { version = "11" }
oxc_sourcemap = { version = "3" } # https://github.com/oxc-project/oxc-sourcemap
[profile.dev]
# Disabling debug info speeds up local and CI builds,
# and we don't rely on it for debugging that much.
debug = false
[profile.test]
# Disabling debug info speeds up local and CI builds,
# and we don't rely on it for debugging that much.
debug = false
[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
[profile.release-debug]
debug = true
inherits = "release"
[profile.release-wasi]
inherits = "release"
opt-level = "s"
# napi-rs generates *-debug.*.wasm files with these information
# it will strip these information for non-debug files
debug = "full"
strip = "none"