Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
241 lines (216 loc) · 11.4 KB
/
Copy pathMODULE.bazel
File metadata and controls
241 lines (216 loc) · 11.4 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
module(name = "pulsebeam", version = "0.3.2")
bazel_dep(name = "rules_rust", version = "0.74.0")
single_version_override(
module_name = "rules_rust",
patches = [
"//tools:patches/rules-rust-analyzer-setup.patch",
"//tools:patches/rules-rust-flycheck-target.patch",
],
patch_strip = 1,
)
bazel_dep(name = "rules_rust_wasm_bindgen", version = "0.74.0")
register_toolchains("//tools:wasm_bindgen_toolchain")
bazel_dep(name = "rules_cc", version = "0.2.18")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "toolchains_llvm", version = "1.10.0")
bazel_dep(name = "rules_nixpkgs_core", version = "0.13.0")
bazel_dep(name = "rules_foreign_cc", version = "0.16.0")
bazel_dep(name = "nasm", version = "3.02")
bazel_dep(name = "protobuf", version = "33.4")
bazel_dep(name = "rules_python", version = "1.9.0")
bazel_dep(name = "aspect_rules_js", version = "3.5.0")
bazel_dep(name = "bazel_lib", version = "3.7.0")
bazel_dep(name = "bazel_skylib", version = "1.9.2")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "rules_nodejs", version = "6.7.5")
bazel_dep(name = "rules_go", version = "0.59.0")
single_version_override(
module_name = "rules_go",
patches = ["//tools:patches/rules-go-repository-cache.patch"],
patch_strip = 1,
)
bazel_dep(name = "gazelle", version = "0.47.0")
bazel_dep(name = "rules_oci", version = "2.2.7")
bazel_dep(name = "rules_pkg", version = "1.1.0")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(name = "pulsebeam_go_sdk", go_mod = "//server/go:go.mod")
use_repo(go_sdk, go_default_sdk = "pulsebeam_go_sdk")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.12.11")
use_repo(python, "python_3_12_11", "python_3_12_11_host")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "server_pypi",
python_version = "3.12.11",
requirements_lock = "//server/python:requirements.lock",
)
pip.parse(
hub_name = "native_agent_pypi",
python_version = "3.12.11",
requirements_lock = "//agents/pulsebeam-agent-native:requirements.lock",
)
use_repo(pip, "server_pypi", "native_agent_pypi")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "22.14.0")
use_repo(node, "nodejs_toolchains")
PNPM_VERSION = "10.12.4"
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
pnpm.pnpm(name = "pnpm", pnpm_version = PNPM_VERSION)
use_repo(pnpm, "pnpm", "pnpm__links")
npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
npm.npm_translate_lock(name = "web_npm", pnpm_lock = "//agents/pulsebeam-agent-web:pnpm-lock.yaml")
npm.npm_translate_lock(name = "native_agent_npm", pnpm_lock = "//agents/pulsebeam-agent-native:pnpm-lock.yaml")
npm.npm_translate_lock(name = "react_npm", pnpm_lock = "//agents/react:pnpm-lock.yaml", npm_package_target_name = "package")
npm.npm_translate_lock(name = "consumer_npm", pnpm_lock = "//agents/react/tests/consumer:pnpm-lock.yaml", npm_package_target_name = "package")
npm.npm_translate_lock(name = "meet_npm", pnpm_lock = "//apps/meet:pnpm-lock.yaml", npm_package_target_name = "package")
# Langium imports these transitive packages without declaring them directly.
# Preserve pnpm's compatibility hoist using the existing locked version.
npm.npm_translate_lock(name = "docs_npm", pnpm_lock = "//docs:pnpm-lock.yaml", public_hoist_packages = {"vscode-languageserver-types": ["docs"], "vscode-languageserver-protocol": ["docs"], "vscode-jsonrpc": ["docs"], "@chevrotain/regexp-to-ast": ["docs"], "@chevrotain/types": ["docs"]})
npm.npm_translate_lock(name = "server_npm", pnpm_lock = "//server/typescript:pnpm-lock.yaml", npm_package_target_name = "package")
use_repo(npm, "web_npm", "native_agent_npm", "react_npm", "consumer_npm", "meet_npm", "docs_npm", "server_npm")
browsers = use_extension("//tools:browsers.bzl", "browsers")
use_repo(browsers, "browser_chrome", "browser_chromedriver", "browser_firefox", "browser_geckodriver")
os_inputs = use_extension("//tools:os.bzl", "os_inputs")
use_repo(os_inputs, "nixpkgs", "nix_sdk", "host_runtime")
test_tools = use_extension("//tools:test-tools.bzl", "test_tools")
use_repo(test_tools, "contract_test_tools")
native = use_extension("//tools:native.bzl", "native")
native.toolchain(llvm_version = "20.1.8")
use_repo(native, "llvm_toolchain", "llvm_toolchain_llvm")
register_toolchains("@llvm_toolchain//:all")
tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
tools.cmake(version = "3.31.12", mode = "binary")
tools.ninja(version = "1.13.2", mode = "binary")
use_repo(tools, "rules_foreign_cc_toolchains")
# utoipa-swagger-ui 9.0.2's default asset, fetched before sandboxed actions.
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
http_file(
name = "swagger_ui_assets",
urls = ["https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.17.14.zip"],
sha256 = "481244d0812097b11fbaeef79f71d942b171617f9c9f9514e63acbe13e71ccdc",
downloaded_file_path = "swagger-ui.zip",
)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "nativelink",
urls = ["https://github.com/TraceMachina/nativelink/releases/download/v1.8.3/nativelink-1.8.3-x86_64-unknown-linux-musl.tar.gz"],
sha256 = "1a6596c96f059d4e99f7352164321e1f1cdff435275667ad8489e83f7e2977c5",
build_file_content = """
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
exports_files(["nativelink", "LICENSE"], visibility = ["//visibility:public"])
sh_binary(name = "bin", srcs = ["nativelink"], visibility = ["//visibility:public"])
""",
)
# auditwheel uses a pinned patchelf executable when validating/repairing native wheels.
http_archive(
name = "native_agent_patchelf",
urls = ["https://files.pythonhosted.org/packages/7e/19/f7821ef31aab01fa7dc8ebe697ece88ec4f7a0fdd3155dab2dfee4b00e5c/patchelf-0.17.2.4-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.musllinux_1_1_x86_64.whl"],
sha256 = "d9b35ebfada70c02679ad036407d9724ffe1255122ba4ac5e4be5868618a5689",
type = "zip",
build_file_content = 'exports_files(["patchelf-0.17.2.4.data/scripts/patchelf"], visibility = ["//visibility:public"])',
)
# npm >=11.5.1 supports GitHub OIDC trusted publishing. Its bundled dependencies
# are provisioned with the CLI, independently of application package lockfiles.
http_archive(
name = "npm_cli",
urls = ["https://registry.npmjs.org/npm/-/npm-11.6.4.tgz"],
sha256 = "9c07edca12853cddbf4fed4e372485aa60c064f9bf3e4cd157a2db5518a1792b",
strip_prefix = "package",
build_file_content = 'load("@aspect_rules_js//js:defs.bzl", "js_binary")\njs_binary(name = "npm", entry_point = "bin/npm-cli.js", data = glob(["**"], exclude = ["BUILD.bazel"]), visibility = ["//visibility:public"])',
)
webrtc = use_extension("//crates/pulsebeam-libwebrtc-sys:repositories.bzl", "webrtc")
use_repo(webrtc, "webrtc_upstream", "webrtc_host", "webrtc_test_tools")
include("//crates/pulsebeam-libwebrtc-sys:deps.MODULE.bazel")
include("//tools:rust-pins.MODULE.bazel")
rust_std_notices = use_repo_rule("//tools/native_licenses:repositories.bzl", "rust_std_notices")
rust_std_notices(
name = "native_agent_rust_std_notices",
host_build = "@pulsebeam_rust_host_tools//:BUILD.bazel",
version_file = "//:rust-toolchain.toml",
)
addon_sources = use_repo_rule("//tools/native_addon_licenses:repositories.bzl", "addon_sources")
addon_sources(
name = "native_agent_node_addon_sources",
graph = "//tools/native_addon_licenses:graph.py",
inventory = "//tools/native_addon_licenses:inventory.py",
mpl = "//tools/native_licenses:supplemental/uniffi-MPL-2.0.txt",
python = "@python_3_12_11_host//:python",
)
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
name = "distroless",
image = "gcr.io/distroless/cc-debian13",
digest = "sha256:1ca671d851d5cd39326d095b949a1d4e6ec836f59c5022b21efcd2773bd3a6d5",
platforms = ["linux/amd64"],
)
use_repo(oci, "distroless", "distroless_linux_amd64")
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate.from_cargo(
name = "crates",
cargo_lockfile = "//:Cargo.lock",
manifests = ["//:Cargo.toml"],
supported_platform_triples = ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown"],
skip_cargo_lockfile_overwrite = True,
host_tools = "@pulsebeam_rust_host_tools//:BUILD.bazel",
)
CMAKE_TOOLCHAINS = ["@rules_foreign_cc//toolchains:current_cmake_toolchain", "@rules_foreign_cc//toolchains:current_ninja_toolchain"]
CMAKE_TOOLS = ["@pulsebeam//tools:cmake.sh"]
CMAKE_ENV = {
"CMAKE": "$(execpath @pulsebeam//tools:cmake.sh)",
"CMAKE_GENERATOR": "Ninja",
"PULSEBEAM_CMAKE": "$${pwd}/$(CMAKE)",
"PULSEBEAM_NINJA": "$${pwd}/$(REAL_NINJA)",
}
CMAKE_INJECTIONS = {"//tools:cmake.sh": "@pulsebeam"}
crate.annotation(crate = "aws-lc-sys", build_script_tools = CMAKE_TOOLS, build_script_toolchains = CMAKE_TOOLCHAINS, build_script_env = CMAKE_ENV, label_injections = CMAKE_INJECTIONS, repositories = ["crates", "str0m_native", "str0m_rtc"])
crate.annotation(crate = "opusic-sys", build_script_tools = CMAKE_TOOLS, build_script_toolchains = CMAKE_TOOLCHAINS, build_script_env = CMAKE_ENV, label_injections = CMAKE_INJECTIONS, repositories = ["crates"])
crate.annotation(
crate = "openh264-sys2",
repositories = ["crates"],
label_injections = {"@nasm//:nasm": "@nasm"},
build_script_tools = ["@nasm//:nasm"],
build_script_env = {"NASM": "$(execpath @nasm//:nasm)"},
)
# Cargo's custom tokio_unstable cfg is applied by .bazelrc, but crate-universe
# does not include cfg-gated edges in its generated platform selects.
crate.annotation(crate = "tokio", deps = ["@crates//tracing"], repositories = ["crates"])
# Link credits actual UDP departures, not security-control records. Preserve
# application-record provenance without changing DTLS wire bytes or cryptography.
crate.annotation(
crate = "dimpl",
version = "=0.9.0",
repositories = ["crates"],
patches = ["//tools:patches/dimpl-application-provenance.patch"],
patch_args = ["-p1"],
)
# Readiness must not prefetch outside the bounded ring. Keep the existing
# tachyonix send/pop path and expose its slot predicate with its native waker.
crate.annotation(
crate = "tachyonix",
repositories = ["crates"],
patches = ["//tools:patches/tachyonix-readable.patch"],
patch_args = ["-p1"],
)
# Established-stream retry mechanism adapted from upstream turmoil-net ad57de6.
# Keep legacy Sim integration; SYN and final-close semantics remain upstream 0.7.2.
crate.annotation(
crate = "turmoil",
repositories = ["crates"],
patches = [
"//tools:patches/turmoil-established-tcp-retransmit.patch",
"//tools:patches/turmoil-udp-destination.patch",
],
patch_args = ["-p1"],
)
# Upstream emits an absolute build-script sandbox path into its RustEmbed derive.
# Resolve OUT_DIR during compilation using rust-embed's maintained interpolation.
crate.annotation(
crate = "utoipa-swagger-ui",
repositories = ["crates"],
patches = ["//tools:patches/swagger-ui-relocatable-embed.patch"],
patch_args = ["-p1"],
build_script_data = ["@swagger_ui_assets//file"],
build_script_env = {"SWAGGER_UI_DOWNLOAD_URL": "file://$(execpath @swagger_ui_assets//file)"},
label_injections = {"@swagger_ui_assets//file": "@swagger_ui_assets"},
)
use_repo(crate, "crates")