Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
164 lines (137 loc) · 5.53 KB
/
Copy pathMODULE.bazel
File metadata and controls
164 lines (137 loc) · 5.53 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
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# When this is updated, the lockfile should be regenerated with:
# bazel-8.7.0 mod deps --lockfile_mode=update
module(
name = "ink",
version = "1.1.0",
)
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
#################################################################################
## Toolchain setup
#################################################################################
# Set up Apple toolchain, must be before rules_cc:
bazel_dep(name = "apple_support", version = "2.8.0")
apple_cc_configure = use_extension(
"@apple_support//crosstool:setup.bzl",
"apple_cc_configure_extension",
)
use_repo(
apple_cc_configure,
"local_config_apple_cc",
"local_config_apple_cc_toolchains",
)
register_toolchains("@local_config_apple_cc_toolchains//:all")
# Configure Go toolchain, which is a transitive dep of Tint used for shader generation.
# This is needed for MacOS builds to link Tint properly:
bazel_dep(name = "rules_go", version = "0.59.0")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.6")
# Configure and register the LLVM toolchain for host builds by default:
bazel_dep(name = "toolchains_llvm", version = "1.12.0")
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(llvm_version = "23.1.4")
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")
# Configure the Android NDK toolchain for NDK builds. Don't register that here so it's not required
# for builds that don't need it. Those configs can register those in --extra_toolchains.
bazel_dep(name = "rules_android_ndk", version = "0.1.3")
android_ndk_repository_extension = use_extension(
"@rules_android_ndk//:extension.bzl",
"android_ndk_repository_extension",
)
use_repo(android_ndk_repository_extension, "androidndk")
#################################################################################
## Direct dependencies
#################################################################################
bazel_dep(
name = "abseil-cpp",
version = "20260526.0",
)
bazel_dep(name = "bazel_skylib", version = "1.9.2")
# Dawn is not yet published to BCR and its MODULE.bazel isn't quite usable by transitive consumers,
# fixing that required some patching. This also required adding build-rules and dependencies for
# building the WebGPU headers in Bazel.
bazel_dep(name = "dawn", version = "v20260731.171941")
git_override(
module_name = "dawn",
commit = "cd2d5a667d1140af6e89f4c4c24f6545e1d5d2d7", # v20260731.171941
patch_strip = 1,
patches = [
"patches/dawn/0001-Fix-MODULE.bazel-and-BUILD.bazel-to-allow-use-as-dep.patch",
],
remote = "https://dawn.googlesource.com/dawn.git",
)
bazel_dep(name = "emsdk", version = "7.0.0")
git_repository(
name = "libtess2",
commit = "446bae6dfb4c3efb43cb2764379574dcb4f0ee6c", # Head as of 2025-04-25
remote = "https://github.com/memononen/libtess2.git",
)
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "protobuf", version = "34.0.bcr.1")
bazel_dep(name = "rules_android", version = "0.6.0")
bazel_dep(name = "rules_apple", version = "5.0.0-rc2")
bazel_dep(name = "rules_cc", version = "0.2.20")
bazel_dep(name = "rules_jni", version = "0.11.1")
bazel_dep(name = "rules_proto", version = "7.1.0")
git_repository(
name = "skia",
commit = "fb92a016ef1dd54b027d022e72689497eb5b6c0e", # Head as of 2025-09-08
remote = "https://github.com/google/skia.git",
)
# Skia configuration
local_repository = use_repo_rule(
"@bazel_tools//tools/build_defs/repo:local.bzl",
"local_repository",
)
local_repository(
name = "skia_user_config",
path = "skia_user_config",
)
#################################################################################
## Development dependencies
#################################################################################
bazel_dep(
name = "googletest",
version = "1.17.0.bcr.2",
dev_dependency = True,
)
bazel_dep(
name = "google_benchmark",
version = "1.8.5",
dev_dependency = True,
)
bazel_dep(
name = "fuzztest",
version = "20260629.0",
dev_dependency = True,
)
# Depend on a later version of Riegeli than the one in Fuzztest to avoid an
# incompatibility with the version of Abseil that we use. We don't use this
# directly, so it can be removed when we upgrade to a version of Fuzztest
# that depends on a later version (pending upgrade in
# https://github.com/google/fuzztest/pull/1742).
bazel_dep(
name = "riegeli",
version = "0.0.0-20250822-9f2744d",
dev_dependency = True,
)
#################################################################################
## Transitive dependencies
#################################################################################
# We can remove these when Skia has a MODULE.bazel file.
# See: https://g-issues.skia.org/issues/367315534
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "libpng", version = "1.6.47")