Skip to content

Commit b14ba87

Browse files
authored
Merge e9e2c97 into 358a508
2 parents 358a508 + e9e2c97 commit b14ba87

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/swc/Cargo.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ plugin_transform_schema_vtest = [
4646

4747
# Enable wasmer plugin runtime implement
4848
plugin_backend_wasmer = ["swc_plugin_backend_wasmer"]
49+
# Enable wasmtime plugin runtime implement
50+
plugin_backend_wasmtime = ["swc_plugin_backend_wasmtime"]
4951

50-
plugin_transform_host_js = ["swc_plugin_backend_wasmer/plugin_transform_host_js"]
52+
plugin_transform_host_js = [
53+
"swc_plugin_backend_wasmer?/plugin_transform_host_js",
54+
]
5155
plugin_transform_host_native = [
52-
"swc_plugin_backend_wasmer/plugin_transform_host_native",
56+
"swc_plugin_backend_wasmer?/plugin_transform_host_native",
5357
]
5458
# Do not inject tokio runtime while running plugin transforms
5559
manual-tokio-runtime = []
@@ -94,7 +98,9 @@ swc_ecma_loader = { version = "15.0.0", path = "../swc_ecma_loader", features =
9498
"tsc",
9599
] }
96100
swc_ecma_minifier = { version = "34.0.2", path = "../swc_ecma_minifier" }
97-
swc_ecma_parser = { version = "25.0.0", path = "../swc_ecma_parser", default-features = false, features = ["typescript"] }
101+
swc_ecma_parser = { version = "25.0.0", path = "../swc_ecma_parser", default-features = false, features = [
102+
"typescript",
103+
] }
98104
swc_ecma_preset_env = { version = "37.0.0", path = "../swc_ecma_preset_env" }
99105
swc_ecma_transforms = { version = "36.0.0", path = "../swc_ecma_transforms", features = [
100106
"compat",
@@ -111,9 +117,10 @@ swc_ecma_utils = { version = "22.0.0", path = "../swc_ecma_utils" }
111117
swc_ecma_visit = { version = "16.0.0", path = "../swc_ecma_visit" }
112118
swc_error_reporters = { version = "17.0.0", path = "../swc_error_reporters" }
113119
swc_node_comments = { version = "15.0.0", path = "../swc_node_comments" }
120+
swc_plugin_backend_wasmer = { version = "3.0.0", path = "../swc_plugin_backend_wasmer", optional = true, default-features = false }
121+
swc_plugin_backend_wasmtime = { version = "2.0.0", path = "../swc_plugin_backend_wasmtime", optional = true, default-features = false }
114122
swc_plugin_proxy = { version = "16.0.0", path = "../swc_plugin_proxy", optional = true }
115123
swc_plugin_runner = { version = "20.0.0", path = "../swc_plugin_runner", optional = true, default-features = false }
116-
swc_plugin_backend_wasmer = { version = "3.0.0", path = "../swc_plugin_backend_wasmer", optional = true, default-features = false }
117124
swc_timer = { version = "1.0.0", path = "../swc_timer" }
118125
swc_transform_common = { version = "9.0.0", path = "../swc_transform_common" }
119126
swc_typescript = { version = "21.0.0", path = "../swc_typescript", optional = true }

crates/swc_core/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ plugin_transform_host_native_shared_runtime = []
231231
# Enable wasmer plugin runtime implement
232232
plugin_backend_wasmer = ["swc/plugin_backend_wasmer"]
233233

234+
# Enable wasmtime plugin runtime implement
235+
plugin_backend_wasmtime = ["swc/plugin_backend_wasmtime"]
236+
234237
# Enable parallel execution of various modules, including minifier using chili
235238
parallel_chili = ["par-core/chili"]
236239
# Enable parallel execution of various modules, including minifier using rayon
@@ -307,8 +310,8 @@ __plugin_transform_host = [
307310
]
308311

309312
# Internal flags to control plugin environment
313+
__plugin_transform_env_js = ["swc/plugin_transform_host_js"]
310314
__plugin_transform_env_native = ["swc/plugin_transform_host_native"]
311-
__plugin_transform_env_js = ["swc/plugin_transform_host_js"]
312315

313316
# Do not use: testing purpose only
314317
# Force enable different version of AST schema

0 commit comments

Comments
 (0)