forked from twitter/twitter-text
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathextensions.bzl
More file actions
23 lines (18 loc) · 746 Bytes
/
extensions.bzl
File metadata and controls
23 lines (18 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Bzlmod module extensions"""
load("//3rdparty/crates:crates.bzl", crate_repositories = "crate_repositories")
def _rust_deps_impl(module_ctx):
# This should contain the subset of WORKSPACE.bazel that defines
# repositories.
direct_deps = []
direct_deps.extend(crate_repositories())
# is_dev_dep is ignored here. It's not relevant for internal_deps, as dev
# dependencies are only relevant for module extensions that can be used
# by other MODULES.
return module_ctx.extension_metadata(
root_module_direct_deps = [repo.repo for repo in direct_deps],
root_module_direct_dev_deps = [],
)
rust_deps = module_extension(
doc = "Cargo dependencies.",
implementation = _rust_deps_impl,
)