Skip to content

Commit 9b60e0d

Browse files
committed
build(bazel): swc_ecma_transforms_base
1 parent e3a55cf commit 9b60e0d

File tree

3 files changed

+98
-1
lines changed

3 files changed

+98
-1
lines changed

crates/swc_ecma_parser/BUILD.bazel

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,30 @@ rust_library(
4343
# "walkdir",
4444
# ]),
4545
#)
46+
47+
rust_library(
48+
name = "swc_ecma_parser-common_concurrent",
49+
srcs = glob(["src/**/*.rs"]),
50+
# default features
51+
crate_features = [
52+
"typescript",
53+
],
54+
crate_name = "swc_ecma_parser",
55+
proc_macro_deps = [
56+
"//crates/enum_kind",
57+
],
58+
deps = [
59+
"//crates/swc_atoms",
60+
"//crates/swc_common:swc_common_concurrent",
61+
"//crates/swc_ecma_ast:swc_ecma_ast-common_concurrent",
62+
"//crates/swc_ecma_visit:swc_ecma_visit-common_concurrent",
63+
] + crate_deps([
64+
"either",
65+
"lexical",
66+
"num-bigint",
67+
"serde",
68+
"smallvec",
69+
"tracing",
70+
"typed-arena",
71+
]),
72+
)
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
load("@swc_cargo_workspace_index//:defs.bzl", "crate_deps")
2+
load("@rules_rust//rust:defs.bzl", "rust_library")
3+
4+
package(default_visibility = ["//visibility:public"])
5+
6+
base_deps = [
7+
"//crates/better_scoped_tls",
8+
"//crates/swc_atoms",
9+
] + crate_deps([
10+
"bitflags",
11+
"once_cell",
12+
"phf",
13+
"rustc-hash",
14+
"serde",
15+
"smallvec",
16+
"tracing",
17+
])
18+
19+
# [BAZELTODO] dev-dependencies
20+
rust_library(
21+
name = "swc_ecma_transforms_base",
22+
srcs = glob(["src/**/*.rs"]),
23+
crate_name = "swc_ecma_transforms_base",
24+
data = glob(["src/helpers/**/*.js"]),
25+
proc_macro_deps = [],
26+
deps = base_deps + [
27+
"//crates/swc_common",
28+
"//crates/swc_ecma_ast",
29+
"//crates/swc_ecma_parser",
30+
"//crates/swc_ecma_utils",
31+
"//crates/swc_ecma_visit",
32+
],
33+
)
34+
35+
rust_library(
36+
name = "swc_ecma_transforms_base_concurrent-renamer",
37+
srcs = glob(["src/**/*.rs"]),
38+
crate_features = ["concurrent-renamer"],
39+
crate_name = "swc_ecma_transforms_base",
40+
data = glob(["src/helpers/**/*.js"]),
41+
proc_macro_deps = [],
42+
deps = base_deps + crate_deps(["rayon"]) + [
43+
"//crates/swc_common",
44+
"//crates/swc_ecma_ast",
45+
"//crates/swc_ecma_parser",
46+
"//crates/swc_ecma_utils",
47+
"//crates/swc_ecma_visit",
48+
],
49+
)
50+
51+
rust_library(
52+
name = "swc_ecma_transforms_base_concurrent",
53+
srcs = glob(["src/**/*.rs"]),
54+
crate_features = [
55+
"concurrent-renamer",
56+
"concurrent",
57+
],
58+
crate_name = "swc_ecma_transforms_base",
59+
data = glob(["src/helpers/**/*.js"]),
60+
proc_macro_deps = [],
61+
deps = base_deps + [
62+
"//crates/swc_common:swc_common_concurrent",
63+
"//crates/swc_ecma_ast:swc_ecma_ast-common_concurrent",
64+
"//crates/swc_ecma_utils:swc_ecma_utils_concurrent",
65+
"//crates/swc_ecma_parser:swc_ecma_parser-common_concurrent",
66+
"//crates/swc_ecma_visit:swc_ecma_visit-common_concurrent",
67+
] + crate_deps([
68+
"rayon",
69+
]),
70+
)

crates/swc_ecma_visit/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rust_library(
2121
)
2222

2323
rust_library(
24-
name = "swc_ecma_visit-common-concurrent",
24+
name = "swc_ecma_visit-common_concurrent",
2525
srcs = glob(["src/**/*.rs"]),
2626
crate_name = "swc_ecma_visit",
2727
deps = base_deps + [

0 commit comments

Comments
 (0)