Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"Bazel dependencies, see https://registry.bazel.build"

module(name = "workerd")

bazel_dep(name = "aspect_bazel_lib", version = "2.21.1")
Expand All @@ -18,6 +17,7 @@ bazel_dep(name = "platforms", version = "1.0.0")
# needs to be pulled in before rules_cc for this toolchain to actually be used.
bazel_dep(name = "apple_support", version = "1.23.1")
bazel_dep(name = "rules_cc", version = "0.2.8")

bazel_dep(name = "zlib", version = "1.3.1.bcr.6")
git_override(
module_name = "zlib",
Expand All @@ -38,9 +38,7 @@ git_override(
bazel_dep(name = "boringssl", version = "0.20250818.0", repo_name = "ssl")

include("//build/deps:deps.MODULE.bazel")

include("//build/deps:nodejs.MODULE.bazel")

include("//build/deps:python.MODULE.bazel")

include("//build/deps:pyodide.MODULE.bazel")
include("//build/deps:v8.MODULE.bazel")
21 changes: 18 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ new_local_repository(
path = "empty",
)

load("//build/deps:dep_pyodide.bzl", "dep_pyodide")

dep_pyodide()
# Use @workerd prefix on build_file so we can use this from edgeworker too
# Note: this one is a raw http_archive so the repository gets the old WORKSPACE-style canonical name.
# Otherwise we have the bzlmod apparent name to deal with, which has plus characters and makes Windows testing harder.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

[
http_archive(
name = "all_pyodide_wheels_%s" % tag,
build_file = "@workerd//:build/BUILD.all_pyodide_wheels",
sha256 = all_wheels_hash,
urls = ["https://github.com/cloudflare/pyodide-build-scripts/releases/download/%s/all_wheels.zip" % tag],
)
# FIXME(alexeagle): Keep in sync
for tag, all_wheels_hash in [
("20240829.4", "94653dc8cfbea62b8013db3b8584bc02544ad6fc647b0d83bdee5dfcda5d4b62"),
("20250808", "7228cf17e569e31238f74b00e4cb702f0b4fc1fa55e6a5144be461e75240048b"),
]
]
7 changes: 5 additions & 2 deletions build/deps/dep_pyodide.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _snapshot_http_files(
_snapshot_http_file(name, "test-snapshot/", numpy_snapshot, numpy_snapshot_integrity, None)
_snapshot_http_file(name, "test-snapshot/", fastapi_snapshot, fastapi_snapshot_integrity, None)

def dep_pyodide():
def _impl(mctx):
for info in PYODIDE_VERSIONS:
_pyodide_core(**info)

Expand All @@ -83,6 +83,9 @@ def dep_pyodide():

for info in PYTHON_LOCKFILES:
_pyodide_packages(**info)

for ver in BUNDLE_VERSION_INFO.values():
if ver["name"] == "development":
continue # development is a copy of earlier bundle snapshots
_snapshot_http_files(**ver)

dep_pyodide = module_extension(implementation = _impl)
29 changes: 29 additions & 0 deletions build/deps/pyodide.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

pyodide = use_extension("//build/deps:dep_pyodide.bzl", "dep_pyodide")
use_repo(
pyodide,
"beautifulsoup4_src_0.26.0a2",
"beautifulsoup4_src_0.28.2",
"beautifulsoup4_src_development",
"fastapi_src_0.26.0a2",
"fastapi_src_0.28.2",
"fastapi_src_development",
"pyodide-0.26.0a2",
"pyodide-0.28.2",
"pyodide-lock_20240829.4.json",
"pyodide-lock_20250808.json",
"pyodide-snapshot-baseline-32a2de5f7.bin",
"pyodide-snapshot-baseline-d13ce2f4a.bin",
"pyodide-snapshot-ew-py-package-snapshot_fastapi-v2.bin",
"pyodide-snapshot-ew-py-package-snapshot_numpy-v2.bin",
"pyodide-snapshot-package_snapshot_fastapi-a6ccb56fe.bin",
"pyodide-snapshot-package_snapshot_numpy-60c9cb28e.bin",
"python-workers-runtime-sdk_src_0.26.0a2",
"python-workers-runtime-sdk_src_0.28.2",
"python-workers-runtime-sdk_src_development",
"scipy_src_0.26.0a2",
"scipy_src_0.28.2",
"scipy_src_development",
)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Loading