-
Notifications
You must be signed in to change notification settings - Fork 28.3k
/
Copy pathCargo.toml
151 lines (132 loc) · 4.52 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
[package]
edition = "2021"
name = "next-swc-napi"
version = "0.0.0"
publish = false
[lib]
crate-type = ["cdylib", "rlib"]
[features]
# Instead of enabling all the plugin-related functionality by default, make it
# overridable when built (i.e napi --build --features plugin). This is due to
# some of transitive dependencies have features cannot be enabled at the same
# time (i.e wasmer/default vs wasmer/js-default) while cargo merges all the
# features at once.
plugin = [
"swc_core/plugin_transform_host_native",
"swc_core/plugin_transform_host_native_filesystem_cache",
"swc_core/plugin_transform_host_native_shared_runtime",
"next-custom-transforms/plugin",
"next-core/plugin",
"turbopack-ecmascript-plugins",
"turbopack-ecmascript-plugins/swc_ecma_transform_plugin",
]
image-webp = ["next-core/image-webp"]
image-avif = ["next-core/image-avif"]
# Enable all the available image codec support.
# Currently this is identical to `image-webp`, as we are not able to build
# other codecs easily yet.
image-extended = ["image-webp"]
# Enable dhat profiling allocator for heap profiling.
__internal_dhat-heap = ["dhat"]
# Enable dhat profiling allocator for ad hoc profiling.
# [Note]: we do not have any ad hoc event in the codebase yet, so enabling this
# effectively does nothing.
__internal_dhat-ad-hoc = ["dhat"]
# Enable support for the tokio console: https://github.com/tokio-rs/console
tokio-console = ["dep:console-subscriber"]
[lints]
workspace = true
[dependencies]
anyhow = "1.0.66"
backtrace = "0.3"
console-subscriber = { workspace = true, optional = true }
dhat = { workspace = true, optional = true }
indexmap = { workspace = true }
owo-colors = { workspace = true }
napi = { version = "2", default-features = false, features = [
"napi3",
"serde-json",
"tokio_rt",
"error_anyhow",
# Lightningcss uses this features
"napi4",
"napi5",
"compat-mode"
] }
napi-derive = "2"
next-custom-transforms = { workspace = true }
rand = { workspace = true }
rustc-hash = { workspace = true }
serde = "1"
serde_json = "1"
supports-hyperlinks = "3.1.0"
terminal_hyperlink = "0.1.0"
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
tracing-chrome = "0.5.0"
url = { workspace = true }
urlencoding = { workspace = true }
once_cell = { workspace = true }
dashmap = { workspace = true }
swc_core = { workspace = true, features = [
"base_concurrent",
"base_node",
"bundler",
"bundler_concurrent",
"common_concurrent",
"ecma_ast",
"ecma_ast_serde",
"ecma_codegen",
"ecma_loader_lru",
"ecma_loader_node",
"ecma_minifier",
"ecma_parser",
"ecma_parser_typescript",
"ecma_transforms",
"ecma_transforms_optimization",
"ecma_transforms_react",
"ecma_transforms_typescript",
"ecma_utils",
"ecma_visit",
] }
# Dependencies for the native, non-wasm32 build.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
lightningcss-napi = { workspace = true }
tokio = { workspace = true, features = ["full"] }
turbo-rcstr = { workspace = true }
turbo-tasks = { workspace = true }
turbo-tasks-memory = { workspace = true }
turbo-tasks-backend = { workspace = true }
turbo-tasks-fs = { workspace = true }
next-api = { workspace = true }
next-build = { workspace = true }
next-core = { workspace = true }
mdxjs = { workspace = true, features = ["serializable"] }
turbo-tasks-malloc = { workspace = true, default-features = false, features = [
"custom_allocator"
] }
turbopack = { workspace = true }
turbopack-core = { workspace = true }
turbopack-ecmascript-hmr-protocol = { workspace = true }
turbopack-trace-utils = { workspace = true }
turbopack-trace-server = { workspace = true }
turbopack-ecmascript-plugins = { workspace = true, optional = true }
# Dependencies for the wasm32 build.
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.9", default-features = false, features = ["js"] }
iana-time-zone = { version = "*", features = ["fallback"] }
mdxjs = { workspace = true }
turbo-tasks-malloc = { workspace = true, default-features = false }
# wasi-only dependencies.
[target.wasm32-wasip1-threads.dependencies]
# this requires tokio_unstable currently.
tokio = { workspace = true, features = ["full"] }
[build-dependencies]
anyhow = { workspace = true }
napi-build = "2"
serde = { workspace = true }
serde_json = { workspace = true }
vergen-gitcl = { workspace = true }
# build-dependencies for the native, non-wasm32 build
[target.'cfg(not(target_arch = "wasm32"))'.build-dependencies]
turbo-tasks-build = { workspace = true }