forked from web-infra-dev/rspack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
178 lines (163 loc) · 6.71 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
cargo-features = ["trim-paths"]
[workspace]
members = ["crates/*"]
resolver = "2" # See https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2
[workspace.package]
authors = ["Rspack Teams"]
categories = ["bundler", "development-tools", "web-programming"]
documentation = "https://rspack.dev/"
homepage = "https://rspack.dev/"
license = "MIT"
repository = "https://github.com/web-infra-dev/rspack"
[workspace.dependencies]
anyhow = { version = "1.0.81", features = ["backtrace"] }
anymap = { version = "=1.0.0-beta.2" }
async-recursion = { version = "1.1.0" }
async-scoped = { version = "0.9.0" }
async-trait = { version = "0.1.79" }
bitflags = { version = "2.5.0" }
camino = { version = "1.1.8" }
concat-string = "1.0.1"
css-module-lexer = "0.0.14"
dashmap = { version = "5.5.3" }
derivative = { version = "2.2.0" }
futures = { version = "0.3.30" }
glob = { version = "0.3.1" }
hashlink = { version = "0.9.0" }
heck = { version = "0.5.0" }
hex = { version = "0.4.3" }
indexmap = { version = "2.2.6" }
indoc = { version = "2.0.5" }
itertools = { version = "0.13.0" }
json = { version = "0.12.4" }
lightningcss = { version = "1.0.0-alpha.58" }
linked_hash_set = { version = "0.1.4" }
mimalloc = { version = "0.1.43" }
mime_guess = { version = "2.0.4" }
once_cell = { version = "1.19.0" }
parcel_sourcemap = "2.1.1"
paste = { version = "1.0" }
path-clean = { version = "1.0.1" }
pathdiff = { version = "0.2.1" }
proc-macro2 = { version = "1.0.79" }
quote = { version = "1.0.35" }
rayon = { version = "1.10.0" }
regex = { version = "1.10.4" }
rspack_sources = { version = "=0.2.17" }
rustc-hash = { version = "1.1.0" }
schemars = { version = "0.8.16" }
serde = { version = "1.0.197" }
serde_json = { version = "1.0.115" }
simd-json = { version = "0.13.10" }
stacker = { version = "0.1.15" }
sugar_path = { version = "1.2.0", features = ["cached_current_dir"] }
syn = { version = "2.0.58" }
tokio = { version = "1.37.0" }
tracing = { version = "0.1.40" }
tracing-subscriber = { version = "0.3.18" }
unicase = { version = "2.7.0" }
url = { version = "2.5.0" }
urlencoding = { version = "2.1.3" }
ustr = { package = "ustr-fxhash", version = "1.0.0" }
xxhash-rust = { version = "0.8.10" }
# Pinned
napi = { package = "napi-h", version = "=2.16.1" }
napi-build = { version = "2" }
napi-derive = { version = "2" }
# Must be pinned with the same swc versions
#rkyv = { version = "=0.7.44" } # synced with swc wasm plugin
swc_config = { version = "=0.1.15" }
swc_core = { version = "=0.101.4", default-features = false }
swc_ecma_minifier = { version = "=0.203.1", default-features = false }
swc_error_reporters = { version = "=0.21.0" }
swc_html = { version = "=0.148.0" }
swc_html_minifier = { version = "=0.145.0", default-features = false }
swc_node_comments = { version = "=0.24.0" }
[workspace.metadata.release]
rate-limit = { existing-packages = 70, new-packages = 70 }
[profile.dev]
codegen-units = 16
debug = 2 # debug build will cause runtime panic if codegen-unints is default
incremental = true
[profile.release]
codegen-units = 1
debug = false
# Performs “thin” LTO. This is similar to “fat”, but takes substantially less time to run while still achieving performance gains similar to “fat”.
lto = "thin"
opt-level = 3
strip = true
[profile.release-prod]
inherits = "release"
# Performs “fat” LTO which attempts to perform optimizations across all crates within the dependency graph.
lto = "fat"
[profile.release-debug]
debug = true
inherits = "release"
strip = false
# the following lints rules are from https://github.com/biomejs/biome/blob/4bd3d6f09642952ee14445ed56af81a73796cea1/Cargo.toml#L7C1-L75C1
[workspace.lints.rust]
absolute_paths_not_starting_with_crate = "warn"
dead_code = "warn"
trivial_numeric_casts = "warn"
unused_import_braces = "warn"
unused_lifetimes = "warn"
unused_macro_rules = "warn"
[workspace.lints.clippy]
cargo_common_metadata = "allow"
empty_docs = "allow" # there are some false positives inside biome_wasm
multiple_crate_versions = "allow"
# pedantic
checked_conversions = "warn"
cloned_instead_of_copied = "warn"
copy_iterator = "warn"
dbg_macro = "warn"
doc_link_with_quotes = "warn"
empty_enum = "warn"
expl_impl_clone_on_copy = "warn"
explicit_into_iter_loop = "warn"
filter_map_next = "warn"
flat_map_option = "warn"
fn_params_excessive_bools = "warn"
from_iter_instead_of_collect = "warn"
implicit_clone = "warn"
# not sure whether it's necessary
# implicit_hasher = "warn"
index_refutable_slice = "warn"
inefficient_to_string = "warn"
invalid_upcast_comparisons = "warn"
iter_not_returning_iterator = "warn"
large_stack_arrays = "warn"
large_types_passed_by_value = "warn"
macro_use_imports = "warn"
manual_ok_or = "warn"
manual_string_new = "warn"
map_flatten = "warn"
map_unwrap_or = "warn"
mismatching_type_param_order = "warn"
mut_mut = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_continue = "warn"
needless_for_each = "warn"
no_effect_underscore_binding = "warn"
ref_binding_to_reference = "warn"
ref_option_ref = "warn"
stable_sort_primitive = "warn"
unnecessary_box_returns = "warn"
unnecessary_join = "warn"
unnested_or_patterns = "warn"
unreadable_literal = "warn"
verbose_bit_mask = "warn"
zero_sized_map_values = "warn"
# restriction
empty_drop = "warn"
float_cmp_const = "warn"
get_unwrap = "warn"
infinite_loop = "warn"
lossy_float_literal = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
verbose_file_reads = "warn"
# https://github.com/rustwasm/wasm-bindgen/issues/3944
#mem_forget = "warn"