-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathCargo.toml
More file actions
175 lines (167 loc) · 8.45 KB
/
Cargo.toml
File metadata and controls
175 lines (167 loc) · 8.45 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
[workspace]
resolver = "2"
members = [
"crates/pack-api",
"crates/pack-cli",
"crates/pack-core",
"crates/pack-napi",
"crates/pack-schema",
"crates/pack-tests",
"crates/pm",
"crates/ruborist",
"crates/utoo-wasm",
]
exclude = ["next.js"]
[workspace.package]
edition = "2024"
license = "MIT"
# tombi: format.rules.table-keys-order.disabled = true
[workspace.dependencies]
pack-api = { path = "./crates/pack-api", default-features = false }
pack-core = { path = "./crates/pack-core", default-features = false }
anyhow = "1.0.96"
async-trait = "0.1.64"
bincode = { version = "2.0.1", features = ["serde"] }
clap = { version = "4.5.32", features = ["derive"] }
console-subscriber = "0.4.1"
criterion = "0.6.0"
dirs = "5.0"
dunce = "1.0.5"
either = "1.9.0"
futures = "0.3.31"
futures-util = "0.3.31"
napi = { version = "2", default-features = false, features = [
# Lightningcss uses this features
"compat-mode",
"error_anyhow",
"napi3",
"napi4",
"napi5",
"serde-json",
"tokio_rt",
] }
napi-derive = "2"
gix = { version = "0.72", default-features = false }
once_cell = "1.17.1"
owo-colors = "4.2.0"
pathdiff = "0.2.1"
rayon = "1.10.0"
regex = "1.11.1"
rustc-hash = "2.1.1"
schemars = "0.8"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_path_to_error = "0.1.16"
simd-json = "0.17.0"
tempfile = "3"
thiserror = "1.0"
tokio = { version = "1.47.1" }
tokio-fs-ext = "0.7.8"
toml = "0.8"
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "fmt"] }
# SWC crates
swc_core = { version = "57.0.0", features = [
"ecma_loader_lru",
"ecma_loader_parking_lot",
"parallel_rayon"
] }
swc_plugin_backend_wasmer = { version = "6.0.0" }
testing = "19.0.0"
# Keep consistent with preset_env_base through swc_core
browserslist-rs = "0.19.0"
mdxjs = "1.0.3"
modularize_imports = "0.110.0"
preset_env_base = "6.0.0"
react_remove_properties = "0.62.0"
remove_console = "0.66.0"
styled_components = "0.139.0"
styled_jsx = "0.114.0"
swc_emotion = "0.115.0"
swc_relay = "0.85.0"
indoc = "2.0.0"
parking_lot = "0.12.4"
qstring = "0.7.2"
rand = "0.9.0"
sha1 = "0.10"
sha2 = "0.10"
url = "2.2.2"
urlencoding = "2.1.2"
lightningcss = "1.0.0-alpha.70"
# Dependencies from nextjs, should keep the same rev!
## Dependencies for common cache and task. See https://github.com/utooland/next.js/blob/canary/turbopack/crates/turbopack/architecture.md
turbo-bincode = { path = "./next.js/turbopack/crates/turbo-bincode" }
turbo-esregex = { path = "./next.js/turbopack/crates/turbo-esregex" }
turbo-rcstr = { path = "./next.js/turbopack/crates/turbo-rcstr" }
turbo-tasks = { path = "./next.js/turbopack/crates/turbo-tasks" }
turbo-tasks-backend = { path = "./next.js/turbopack/crates/turbo-tasks-backend" }
turbo-tasks-bytes = { path = "./next.js/turbopack/crates/turbo-tasks-bytes" }
turbo-tasks-env = { path = "./next.js/turbopack/crates/turbo-tasks-env" }
turbo-tasks-fetch = { path = "./next.js/turbopack/crates/turbo-tasks-fetch" }
turbo-tasks-fs = { path = "./next.js/turbopack/crates/turbo-tasks-fs" }
turbo-tasks-hash = { path = "./next.js/turbopack/crates/turbo-tasks-hash" }
turbo-tasks-malloc = { path = "./next.js/turbopack/crates/turbo-tasks-malloc", default-features = false }
turbo-unix-path = { path = "./next.js/turbopack/crates/turbo-unix-path" }
## # Dependencies for bundler specially.
turbopack = { path = "./next.js/turbopack/crates/turbopack" }
turbopack-browser = { path = "./next.js/turbopack/crates/turbopack-browser" }
turbopack-cli-utils = { path = "./next.js/turbopack/crates/turbopack-cli-utils" }
turbopack-core = { path = "./next.js/turbopack/crates/turbopack-core" }
turbopack-css = { path = "./next.js/turbopack/crates/turbopack-css" }
turbopack-dev-server = { path = "./next.js/turbopack/crates/turbopack-dev-server" }
turbopack-ecmascript = { path = "./next.js/turbopack/crates/turbopack-ecmascript" }
turbopack-ecmascript-hmr-protocol = { path = "./next.js/turbopack/crates/turbopack-ecmascript-hmr-protocol" }
turbopack-ecmascript-plugins = { path = "./next.js/turbopack/crates/turbopack-ecmascript-plugins", default-features = false }
turbopack-ecmascript-runtime = { path = "./next.js/turbopack/crates/turbopack-ecmascript-runtime" }
turbopack-image = { path = "./next.js/turbopack/crates/turbopack-image" }
turbopack-node = { path = "./next.js/turbopack/crates/turbopack-node", default-features = false }
turbopack-nodejs = { path = "./next.js/turbopack/crates/turbopack-nodejs" }
turbopack-resolve = { path = "./next.js/turbopack/crates/turbopack-resolve" }
turbopack-static = { path = "./next.js/turbopack/crates/turbopack-static" }
turbopack-test-utils = { path = "./next.js/turbopack/crates/turbopack-test-utils" }
turbopack-trace-server = { path = "./next.js/turbopack/crates/turbopack-trace-server" }
turbopack-trace-utils = { path = "./next.js/turbopack/crates/turbopack-trace-utils" }
[workspace.lints.clippy]
too_many_arguments = "allow"
[patch.crates-io]
bincode = { git = "https://github.com/bgw/bincode.git", branch = "bgw/patches" }
include_dir = { git = "https://github.com/vercel-labs/include_dir", branch = "turbopack" }
lightningcss = { git = "https://github.com/utooland/lightningcss", branch = "support-css-module-global" }
mdxjs = { git = "https://github.com/vercel-labs/mdxjs-rs-turbopack.git", branch = "turbopack" }
mimalloc = { git = "https://github.com/utooland/mimalloc_rust.git" }
parcel_selectors = { git = "https://github.com/utooland/lightningcss", branch = "support-css-module-global" }
tokio = { package = "tokio", git = "https://github.com/utooland/tokio.git" }
tokio-util = { package = "tokio-util", git = "https://github.com/utooland/tokio.git" }
virtue = { git = "https://github.com/bgw/virtue.git", branch = "bgw/fix-generic-default-parsing" }
[profile.release]
opt-level = "z"
strip = "symbols"
lto = "fat"
# cargo build --profile instruments --bin pack-cli
# xcrun xctrace record --template "Time Profiler" --launch -- ./target/instruments/pack-cli --mode build --project-path ./examples/with-antd --root-path .
# xcrun xctrace record --template "System Trace" --launch -- ./target/instruments/pack-cli --mode build --project-path ./examples/with-antd --root-path .
# open Lauch_pack-cli_xxx.trace
[profile.instruments]
inherits = "release"
opt-level = 1
debug = 1
strip = "none"
lto = false
incremental = true
codegen-units = 256
[profile.release-local]
inherits = "release"
opt-level = 1
split-debuginfo = "unpacked"
strip = "none"
lto = false
incremental = true
codegen-units = 256
[profile.wasm-dev]
inherits = "release"
opt-level = 1
debug = 1
strip = "none"
lto = false
incremental = true
codegen-units = 256