Skip to content

Commit 3a0c8a3

Browse files
committed
Fix and run //docs:update
1 parent 4d6754b commit 3a0c8a3

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

MODULE.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ module(
99
bazel_dep(name = "bazel_skylib", version = "1.4.1")
1010
bazel_dep(name = "platforms", version = "0.0.5")
1111

12+
# workaround for https://github.com/bazelbuild/bazel/issues/25124
13+
bazel_dep(name = "zlib", version = "1.3.1.bcr.6", dev_dependency = True)
14+
1215
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
1316

1417
# Note, this gets the default version of Node.js from

WORKSPACE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ http_archive(
6060
# Dependencies & toolchains needed for unit tests & generating documentation
6161
#
6262

63+
# workaround for https://github.com/bazelbuild/bazel/issues/25124
64+
zlib_version = "1.3.1"
65+
66+
zlib_sha256 = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
67+
68+
http_archive(
69+
name = "zlib",
70+
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
71+
sha256 = zlib_sha256,
72+
strip_prefix = "zlib-%s" % zlib_version,
73+
urls = ["https://github.com/madler/zlib/releases/download/v{v}/zlib-{v}.tar.gz".format(v = zlib_version)],
74+
)
75+
6376
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "register_copy_directory_toolchains", "register_copy_to_directory_toolchains")
6477

6578
aspect_bazel_lib_dependencies()

docs/Core.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ nodejs_toolchain(
183183
```
184184

185185
Next, declare which execution platforms or target platforms the toolchain should be selected for
186-
based on constraints.
186+
based on constraints. A separate toolchain type is used for runtime target platform selection.
187187

188188
```starlark
189189
toolchain(
@@ -195,6 +195,15 @@ toolchain(
195195
toolchain = ":toolchain",
196196
toolchain_type = "@rules_nodejs//nodejs:toolchain_type",
197197
)
198+
toolchain(
199+
name = "my_nodejs_runtime",
200+
target_compatible_with = [
201+
"@platforms//os:linux",
202+
"@platforms//cpu:x86_64",
203+
],
204+
toolchain = ":toolchain",
205+
toolchain_type = "@rules_nodejs//nodejs:runtime_toolchain_type",
206+
)
198207
```
199208

200209
See https://bazel.build/extending/toolchains#toolchain-resolution for more information on toolchain

0 commit comments

Comments
 (0)