-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMODULE.bazel
84 lines (71 loc) · 2.75 KB
/
MODULE.bazel
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
bazel_dep(name = "aspect_bazel_lib", version = "2.11.0")
bazel_dep(name = "aspect_rules_jest", version = "0.22.0")
bazel_dep(name = "aspect_rules_js", version = "2.1.2")
bazel_dep(name = "aspect_rules_lint", version = "1.0.8")
bazel_dep(name = "aspect_rules_ts", version = "3.4.0")
bazel_dep(
name = "buildifier_prebuilt",
version = "8.0.0",
)
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_multitool", version = "0.15.0")
bazel_dep(name = "rules_nodejs", version = "6.3.3")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "toolchains_llvm", version = "1.2.0")
bazel_dep(name = "xz", version = "5.4.5.bcr.5")
# FIXME: Remove when a new `toolchains_llvm` has been released.
git_override(
module_name = "toolchains_llvm",
commit = "bda1c9fbf232b682c30d039f8e4a5e3cf3025d0f",
remote = "https://github.com/bazel-contrib/toolchains_llvm",
)
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
multitool.hub(lockfile = "//tools:tools.lock.json")
use_repo(multitool, "multitool")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(node_version = "20.18.0")
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
pnpm.pnpm(
name = "pnpm",
pnpm_version = "8.15.9",
)
# Allows developers to use the matching pnpm version, for example:
# bazel run -- @pnpm//:pnpm install --dir $PWD --lockfile-only
use_repo(pnpm, "pnpm")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
name = "npm",
bins = {
"@google-cloud/functions-framework": [
"functions-framework=build/src/main.js",
],
},
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
)
use_repo(npm, "npm")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)
rules_ts_ext.deps(
ts_version_from = "//:package.json",
)
use_repo(rules_ts_ext, "npm_typescript")
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
libclang_rt = {
"@libclang_rt-wasm32-wasi//:libclang_rt.builtins-wasm32.a": "wasm32-unknown-unknown/libclang_rt.builtins.a",
},
llvm_versions = {
"": "19.1.0",
},
stdlib = {"wasm32": "libc"},
)
llvm.sysroot(
label = "@wasi-sysroot//sysroots/wasm32-wasip2",
targets = ["wasm32"],
)
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")
wasi_sysroot = use_repo_rule("//src/infrastructure/xzdec:wasm.bzl", "wasi_sysroot")
wasm32_libclang_rt = use_repo_rule("//src/infrastructure/xzdec:wasm.bzl", "wasm32_libclang_rt")
wasi_sysroot(name = "wasi-sysroot")
wasm32_libclang_rt(name = "libclang_rt-wasm32-wasi")