Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cloudflare/workerd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f37b4c64ddc4b61e6eee541aceea13bd43a05501
Choose a base ref
...
head repository: cloudflare/workerd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3ad23dfaecf35ea967c50c64e9e45e358c6d6efd
Choose a head ref
Loading
Showing with 4,756 additions and 1,062 deletions.
  1. +3 −2 .github/workflows/_bazel.yml
  2. +1 −0 .github/workflows/cla.yml
  3. +1 −0 .github/workflows/lint.yml
  4. +1 −1 .github/workflows/npm-types.yml
  5. +1 −1 .github/workflows/npm.yml
  6. +1 −1 .github/workflows/release-python-runtime.yml
  7. +5 −4 .github/workflows/release.yml
  8. +8 −7 .github/workflows/test.yml
  9. +2 −1 .github/workflows/type-snapshot.yml
  10. +1 −1 README.md
  11. +0 −11 WORKSPACE
  12. +10 −1 build/deps/build_deps.jsonc
  13. +2 −0 build/deps/gen/build_deps.bzl
  14. +19 −0 build/deps/gen/dep_wpt.bzl
  15. +278 −17 deps/rust/Cargo.lock
  16. +6 −4 deps/rust/cargo.bzl
  17. +52 −0 deps/rust/crates/BUILD.aho-corasick-1.1.3.bazel
  18. +19 −1 deps/rust/crates/BUILD.bazel
  19. +54 −0 deps/rust/crates/BUILD.bstr-1.11.1.bazel
  20. +47 −0 deps/rust/crates/BUILD.either-1.13.0.bazel
  21. +47 −0 deps/rust/crates/BUILD.getopts-0.2.21.bazel
  22. +64 −0 deps/rust/crates/BUILD.getrandom-0.2.15.bazel
  23. +50 −0 deps/rust/crates/BUILD.is-macro-0.3.7.bazel
  24. +52 −0 deps/rust/crates/BUILD.itertools-0.13.0.bazel
  25. +47 −0 deps/rust/crates/BUILD.phf-0.11.2.bazel
  26. +48 −0 deps/rust/crates/BUILD.phf_codegen-0.11.2.bazel
  27. +90 −0 deps/rust/crates/BUILD.phf_generator-0.11.2.bazel
  28. +51 −0 deps/rust/crates/BUILD.phf_shared-0.11.2.bazel
  29. +72 −0 deps/rust/crates/BUILD.rand-0.8.5.bazel
  30. +51 −0 deps/rust/crates/BUILD.rand_chacha-0.3.1.bazel
  31. +52 −0 deps/rust/crates/BUILD.rand_core-0.6.4.bazel
  32. +47 −0 deps/rust/crates/BUILD.regex-automata-0.4.9.bazel
  33. +57 −0 deps/rust/crates/BUILD.ruff_python_ast-0.0.0.bazel
  34. +57 −0 deps/rust/crates/BUILD.ruff_python_parser-0.0.0.bazel
  35. +50 −0 deps/rust/crates/BUILD.ruff_python_trivia-0.0.0.bazel
  36. +49 −0 deps/rust/crates/BUILD.ruff_source_file-0.0.0.bazel
  37. +44 −0 deps/rust/crates/BUILD.ruff_text_size-0.0.0.bazel
  38. +48 −0 deps/rust/crates/BUILD.rustc-hash-1.1.0.bazel
  39. +44 −0 deps/rust/crates/BUILD.static_assertions-1.1.0.bazel
  40. +1 −0 deps/rust/crates/BUILD.syn-2.0.90.bazel
  41. +52 −0 deps/rust/crates/BUILD.tinyvec-1.8.0.bazel
  42. +44 −0 deps/rust/crates/BUILD.tinyvec_macros-0.1.1.bazel
  43. +51 −0 deps/rust/crates/BUILD.unicode-normalization-0.1.24.bazel
  44. +113 −0 deps/rust/crates/BUILD.unicode_names2-1.3.0.bazel
  45. +53 −0 deps/rust/crates/BUILD.unicode_names2_generator-1.3.0.bazel
  46. +274 −0 deps/rust/crates/defs.bzl
  47. +24 −9 src/cloudflare/internal/ai-api.ts
  48. +7 −1 src/cloudflare/internal/test/ai/ai-api-test.js
  49. +9 −3 src/cloudflare/internal/test/ai/ai-mock.js
  50. +3 −1 src/node/dns.ts
  51. +3 −163 src/node/dns/promises.ts
  52. +5 −2 src/node/internal/internal_buffer.ts
  53. +3 −0 src/node/internal/internal_dns_constants.ts
  54. +164 −0 src/node/internal/internal_dns_promises.ts
  55. +4 −2 src/node/internal/internal_utils.ts
  56. +41 −8 src/pyodide/internal/workers.py
  57. +8 −0 src/rust/cxx-integration/cxx-bridge.h
  58. +21 −0 src/rust/python-parser/BUILD
  59. +173 −0 src/rust/python-parser/import_parsing.c++
  60. +41 −0 src/rust/python-parser/lib.rs
  61. +2 −0 src/workerd/api/BUILD.bazel
  62. +249 −48 src/workerd/api/html-rewriter.c++
  63. +37 −43 src/workerd/api/html-rewriter.h
  64. +31 −27 src/workerd/api/http-test-ts.ts
  65. +18 −2 src/workerd/api/http-test-ts.ts-wd-test
  66. +6 −3 src/workerd/api/http.c++
  67. +30 −12 src/workerd/api/http.h
  68. +72 −13 src/workerd/api/kv.c++
  69. +8 −5 src/workerd/api/kv.h
  70. +15 −8 src/workerd/api/node/tests/buffer-nodejs-test.js
  71. +2 −0 src/workerd/api/node/tests/dns-nodejs-test.js
  72. +6 −8 src/workerd/api/r2-admin.c++
  73. +42 −7 src/workerd/api/r2-bucket.c++
  74. +18 −0 src/workerd/api/r2-bucket.h
  75. +9 −6 src/workerd/api/r2-multipart.c++
  76. +4 −2 src/workerd/api/streams/compression.c++
  77. +4 −2 src/workerd/api/streams/internal.h
  78. +8 −4 src/workerd/api/streams/queue.h
  79. +150 −0 src/workerd/api/tests/htmlrewriter-test.js
  80. +6 −6 src/workerd/api/trace.c++
  81. +9 −11 src/workerd/api/trace.h
  82. +4 −2 src/workerd/api/unsafe.c++
  83. +34 −31 src/workerd/api/wpt/urlpattern-test.js
  84. +7 −1 src/workerd/io/compatibility-date.capnp
  85. +4 −4 src/workerd/io/io-context.c++
  86. +2 −10 src/workerd/io/io-context.h
  87. +1 −1 src/workerd/io/limit-enforcer.h
  88. +1 −1 src/workerd/io/supported-compatibility-date.txt
  89. +3 −2 src/workerd/io/worker.c++
  90. +4 −0 src/workerd/jsg/BUILD.bazel
  91. +183 −0 src/workerd/jsg/commonjs.c++
  92. +151 −0 src/workerd/jsg/commonjs.h
  93. +1 −160 src/workerd/jsg/modules.c++
  94. +4 −176 src/workerd/jsg/modules.h
  95. +23 −0 src/workerd/jsg/script.c++
  96. +32 −0 src/workerd/jsg/script.h
  97. +55 −2 src/workerd/server/tests/python/sdk/worker.py
  98. +2 −0 types/defines/rpc.d.ts
  99. +45 −11 types/generated-snapshot/2021-11-03/index.d.ts
  100. +44 −11 types/generated-snapshot/2021-11-03/index.ts
  101. +45 −11 types/generated-snapshot/2022-01-31/index.d.ts
  102. +44 −11 types/generated-snapshot/2022-01-31/index.ts
  103. +45 −11 types/generated-snapshot/2022-03-21/index.d.ts
  104. +44 −11 types/generated-snapshot/2022-03-21/index.ts
  105. +45 −11 types/generated-snapshot/2022-08-04/index.d.ts
  106. +44 −11 types/generated-snapshot/2022-08-04/index.ts
  107. +45 −11 types/generated-snapshot/2022-10-31/index.d.ts
  108. +44 −11 types/generated-snapshot/2022-10-31/index.ts
  109. +45 −11 types/generated-snapshot/2022-11-30/index.d.ts
  110. +44 −11 types/generated-snapshot/2022-11-30/index.ts
  111. +45 −11 types/generated-snapshot/2023-03-01/index.d.ts
  112. +44 −11 types/generated-snapshot/2023-03-01/index.ts
  113. +45 −11 types/generated-snapshot/2023-07-01/index.d.ts
  114. +44 −11 types/generated-snapshot/2023-07-01/index.ts
  115. +47 −13 types/generated-snapshot/experimental/index.d.ts
  116. +46 −13 types/generated-snapshot/experimental/index.ts
  117. +45 −11 types/generated-snapshot/oldest/index.d.ts
  118. +44 −11 types/generated-snapshot/oldest/index.ts
5 changes: 3 additions & 2 deletions .github/workflows/_bazel.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ on:
image:
type: string
required: false
default: "ubuntu-20.04"
default: "ubuntu-22.04"
os_name:
type: string
required: false
@@ -67,7 +67,8 @@ jobs:
run: |
git config --global core.symlinks true
git config --show-scope --show-origin core.symlinks
[System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=C:/tmp')
git config --system core.longpaths true
[System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=\\\\?\\C:\\tmp')
- name: Configure download mirrors
shell: bash
run: |
1 change: 1 addition & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]
merge_group:

jobs:
CLAssistant:
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ name: Lint

on:
pull_request:
merge_group:
push:
branches:
- main
2 changes: 1 addition & 1 deletion .github/workflows/npm-types.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ jobs:
echo "version=${{ inputs.prerelease == false && '4' || '0'}}.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').${{ inputs.patch }}" >> $GITHUB_OUTPUT;
echo "release_version=1.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').0" >> $GITHUB_OUTPUT;
build-and-publish-types:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: version
steps:
- uses: actions/checkout@v4
2 changes: 1 addition & 1 deletion .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ jobs:
# if: github.repository_owner == 'cloudflare'
name: Publish `workerd` to NPM
needs: [version, publish-arch-specific]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v4
2 changes: 1 addition & 1 deletion .github/workflows/release-python-runtime.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: build Python runtime
steps:
- uses: actions/checkout@v4
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
outputs:
version: ${{ steps.echo.outputs.version }}
# version job uses ubuntu 24.04, this way we don't have to install the updated clang while
# the build job uses 20.04 for libc compatibility.
# the build job uses 22.04 for libc compatibility.
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
@@ -56,11 +56,11 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, macos-15, windows-2022]
os: [ubuntu-22.04, macos-15, windows-2022]
target-arch: [ X64 ]
include:
- os-name: linux
os: ubuntu-20.04
os: ubuntu-22.04
bazel-config: release_linux
# Based on runner availability, we build both Apple Silicon and (cross-compiled) x86
# release binaries on the macos-15 runner.
@@ -114,9 +114,10 @@ jobs:
if: runner.os == 'Windows'
run: |
git config --global core.symlinks true
git config --system core.longpaths true
git config --show-scope --show-origin core.symlinks
# Set a custom output root directory to avoid long file name issues.
[System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=C:/tmp')
[System.IO.File]::WriteAllLines((Join-Path -Path $env:USERPROFILE -ChildPath '.bazelrc'), 'startup --output_user_root=\\\\?\\C:\\tmp')
- name: Configure download mirrors
shell: bash
run: |
15 changes: 8 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
pull_request:
paths-ignore:
- 'doc/**'
merge_group:
push:
branches:
- main
@@ -27,9 +28,9 @@ jobs:
matrix:
os:
[
{ name : linux, image : ubuntu-20.04 },
{ name : linux, image : ubuntu-22.04 },
{ name : macOS, image : macos-15 },
{ name : windows, image : windows-2022 }
{ name : windows, image : windows-2025 }
]
config:
[
@@ -40,22 +41,22 @@ jobs:
]
include:
# Add an Address Sanitizer (ASAN) build on Linux for additional checking.
- os: { name: linux, image: ubuntu-20.04 }
- os: { name: linux, image: ubuntu-22.04 }
config: { suffix: -asan }
# Windows has a custom non-debug bazel config.
- os: { name : windows, image : windows-2022 }
- os: { name : windows, image : windows-2025 }
config: { suffix: '' }
# TODO (later): The custom Windows-debug configuration consistently runs out of disk
# space on CI, disable it for now. Once https://github.com/bazelbuild/bazel/issues/21615
# has been resolved we can likely re-enable it and possibly fold up the custom
# configurations, as we can more easily disable PDB file generation.
# - os: { name : windows, image : windows-2022 }
# - os: { name : windows, image : windows-2025 }
# config: { suffix: -debug, bazel-args: --config=windows_dbg }
exclude:
# Skip the matrix generated Windows non-debug config to use the one added above.
- os: { name : windows, image : windows-2022 }
- os: { name : windows, image : windows-2025 }
config: { suffix: '' }
- os: { name : windows, image : windows-2022 }
- os: { name : windows, image : windows-2025 }
config: { suffix: -debug }
# due to resource constraints, exclude the macOS-debug runner for now. linux-debug and
# linux-asan should provide sufficient coverage for building in the debug configuration.
3 changes: 2 additions & 1 deletion .github/workflows/type-snapshot.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
pull_request:
paths-ignore:
- 'doc/**'
merge_group:
push:
branches:
- main
@@ -16,7 +17,7 @@ concurrency:

jobs:
check-snapshot:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ For more details about command-line usage, use `workerd --help`.
Prebuilt binaries are distributed via `npm`. Run `npx workerd ...` to use these. If you're running a prebuilt binary, you'll need to make sure your system has the right dependencies installed:

* On Linux:
* glibc 2.31 or higher (already included on e.g. Ubuntu 20.04, Debian Bullseye)
* glibc 2.35 or higher (already included on e.g. Ubuntu 22.04, Debian Bookworm)
* On macOS:
* macOS 13.5 or higher
* The Xcode command line tools, which can be installed with `xcode-select --install`
11 changes: 0 additions & 11 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -393,14 +393,3 @@ new_local_repository(
build_file = "@workerd//deps/rust:BUILD.lolhtml",
path = "empty",
)

# ========================================================================================
# Web Platform Tests

http_archive(
name = "wpt",
build_file = "//:build/BUILD.wpt",
integrity = "sha256-Hxn/D6x6lI9ISlCQFq620sb8x9iXplVzXPV6zumX84A=",
strip_prefix = "wpt-merge_pr_48695",
url = "https://github.com/web-platform-tests/wpt/archive/refs/tags/merge_pr_48695.tar.gz",
)
11 changes: 10 additions & 1 deletion build/deps/build_deps.jsonc
Original file line number Diff line number Diff line change
@@ -219,6 +219,15 @@
"repo": "ruff",
"file_regex": "^ruff-x86_64-unknown-linux-gnu.tar.gz$",
"build_file_content": "filegroup(name='file', srcs=glob(['**']))"
}
},
//wpt
{
"name": "wpt",
"type": "github_release",
"owner": "cloudflare",
"repo": "workerd-tools",
"file_regex": "wpt-.*.tar.gz",
"build_file": "//:build/BUILD.wpt"
}
]
}
2 changes: 2 additions & 0 deletions build/deps/gen/build_deps.bzl
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ load("@//build/deps:gen/dep_rules_nodejs.bzl", "dep_rules_nodejs")
load("@//build/deps:gen/dep_rules_pkg.bzl", "dep_rules_pkg")
load("@//build/deps:gen/dep_rules_python.bzl", "dep_rules_python")
load("@//build/deps:gen/dep_rules_rust.bzl", "dep_rules_rust")
load("@//build/deps:gen/dep_wpt.bzl", "dep_wpt")

def deps_gen():
dep_bazel_skylib()
@@ -56,3 +57,4 @@ def deps_gen():
dep_ruff_darwin_arm64()
dep_ruff_linux_arm64()
dep_ruff_linux_amd64()
dep_wpt()
19 changes: 19 additions & 0 deletions build/deps/gen/dep_wpt.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# WARNING: THIS FILE IS AUTOGENERATED BY update-deps.py DO NOT EDIT

load("@//:build/http.bzl", "http_archive")

TAG_NAME = "wpt-af83b77e2"
URL = "https://github.com/cloudflare/workerd-tools/releases/download/wpt-af83b77e2/wpt-af83b77e2.tar.gz"
STRIP_PREFIX = "wpt-af83b77e2"
SHA256 = "ce7f09bc8ab6604362897c484a1ee044afd7254741e3cecd7cf609d93d779d51"
TYPE = "tgz"

def dep_wpt():
http_archive(
name = "wpt",
url = URL,
strip_prefix = STRIP_PREFIX,
type = TYPE,
sha256 = SHA256,
build_file = "//:build/BUILD.wpt",
)
Loading