diff --git a/deps/rust/BUILD.lolhtml b/deps/rust/BUILD.lolhtml
index 4abef0883f8..f4caf92f192 100644
--- a/deps/rust/BUILD.lolhtml
+++ b/deps/rust/BUILD.lolhtml
@@ -1,10 +1,9 @@
cc_library(
name = "lolhtml",
- hdrs = ["@crates_vendor__lol_html-2.0.0//:c-api/include/lol_html.h"],
- include_prefix = "c-api/include",
- strip_include_prefix = "c-api/include",
+ hdrs = ["@crates_vendor__lol_html_c_api-1.1.2//:include/lol_html.h"],
+ strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [
- "@crates_vendor//:lolhtml",
+ "@crates_vendor//:lol_html_c_api",
],
)
diff --git a/deps/rust/Cargo.lock b/deps/rust/Cargo.lock
index d830399314d..f4d6cf7176f 100644
--- a/deps/rust/Cargo.lock
+++ b/deps/rust/Cargo.lock
@@ -277,7 +277,7 @@ dependencies = [
"cxx",
"cxxbridge-cmd",
"flate2",
- "lolhtml",
+ "lol_html_c_api",
"nix",
"pico-args",
"proc-macro2",
@@ -437,8 +437,8 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "lol_html"
-version = "2.0.0"
-source = "git+https://github.com/cloudflare/lol-html.git?rev=a161bb319a61ddfb4c66e29153bbf8d6491f28cf#a161bb319a61ddfb4c66e29153bbf8d6491f28cf"
+version = "2.1.0"
+source = "git+https://github.com/cloudflare/lol-html.git?rev=cac9f2f59aea8ad803286b0aae0d667926f441c7#cac9f2f59aea8ad803286b0aae0d667926f441c7"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
@@ -454,9 +454,9 @@ dependencies = [
]
[[package]]
-name = "lolhtml"
+name = "lol_html_c_api"
version = "1.1.2"
-source = "git+https://github.com/cloudflare/lol-html.git?rev=a161bb319a61ddfb4c66e29153bbf8d6491f28cf#a161bb319a61ddfb4c66e29153bbf8d6491f28cf"
+source = "git+https://github.com/cloudflare/lol-html.git?rev=cac9f2f59aea8ad803286b0aae0d667926f441c7#cac9f2f59aea8ad803286b0aae0d667926f441c7"
dependencies = [
"encoding_rs",
"libc",
diff --git a/deps/rust/cargo.bzl b/deps/rust/cargo.bzl
index e1bada151a1..7f1e76d01d8 100644
--- a/deps/rust/cargo.bzl
+++ b/deps/rust/cargo.bzl
@@ -16,7 +16,9 @@ PACKAGES = {
"cxx": crate.spec(version = "1"),
"cxxbridge-cmd": crate.spec(version = "1"),
"flate2": crate.spec(version = "1"),
- "lolhtml": crate.spec(git = "https://github.com/cloudflare/lol-html.git", rev = "a161bb319a61ddfb4c66e29153bbf8d6491f28cf"),
+ # Commit hash refers to lol-html v2.1.0. We then access the nested lol_html_c_api crate within.
+ # TODO(npaun): Seems like some changes are still ongoing on the lol-html side. Recheck this in a couple weeks.
+ "lol_html_c_api": crate.spec(git = "https://github.com/cloudflare/lol-html.git", rev = "cac9f2f59aea8ad803286b0aae0d667926f441c7"),
"nix": crate.spec(version = "0"),
"pico-args": crate.spec(version = "0"),
"proc-macro2": crate.spec(version = "1"),
diff --git a/deps/rust/crates/BUILD.bazel b/deps/rust/crates/BUILD.bazel
index 07b45217a2d..fc10f31b17f 100644
--- a/deps/rust/crates/BUILD.bazel
+++ b/deps/rust/crates/BUILD.bazel
@@ -86,8 +86,8 @@ alias(
)
alias(
- name = "lolhtml",
- actual = "@crates_vendor__lolhtml-1.1.2//:lolhtml",
+ name = "lol_html_c_api",
+ actual = "@crates_vendor__lol_html_c_api-1.1.2//:lolhtml",
tags = ["manual"],
)
diff --git a/deps/rust/crates/BUILD.lol_html-2.0.0.bazel b/deps/rust/crates/BUILD.lol_html-2.1.0.bazel
similarity index 98%
rename from deps/rust/crates/BUILD.lol_html-2.0.0.bazel
rename to deps/rust/crates/BUILD.lol_html-2.1.0.bazel
index 9a7684c1401..282f331224e 100644
--- a/deps/rust/crates/BUILD.lol_html-2.0.0.bazel
+++ b/deps/rust/crates/BUILD.lol_html-2.1.0.bazel
@@ -40,7 +40,7 @@ rust_library(
"noclippy",
"norustfmt",
],
- version = "2.0.0",
+ version = "2.1.0",
deps = [
"@crates_vendor__bitflags-2.6.0//:bitflags",
"@crates_vendor__cfg-if-1.0.0//:cfg_if",
diff --git a/deps/rust/crates/BUILD.lolhtml-1.1.2.bazel b/deps/rust/crates/BUILD.lol_html_c_api-1.1.2.bazel
similarity index 91%
rename from deps/rust/crates/BUILD.lolhtml-1.1.2.bazel
rename to deps/rust/crates/BUILD.lol_html_c_api-1.1.2.bazel
index 3317318c2a4..073d2a7aa9c 100644
--- a/deps/rust/crates/BUILD.lolhtml-1.1.2.bazel
+++ b/deps/rust/crates/BUILD.lol_html_c_api-1.1.2.bazel
@@ -36,7 +36,7 @@ rust_library(
],
tags = [
"cargo-bazel",
- "crate-name=lolhtml",
+ "crate-name=lol_html_c_api",
"manual",
"noclippy",
"norustfmt",
@@ -45,8 +45,8 @@ rust_library(
deps = [
"@crates_vendor__encoding_rs-0.8.35//:encoding_rs",
"@crates_vendor__libc-0.2.162//:libc",
- "@crates_vendor__lol_html-2.0.0//:lol_html",
- "@crates_vendor__lolhtml-1.1.2//:build_script_build",
+ "@crates_vendor__lol_html-2.1.0//:lol_html",
+ "@crates_vendor__lol_html_c_api-1.1.2//:build_script_build",
"@crates_vendor__thiserror-1.0.69//:thiserror",
],
)
@@ -86,13 +86,13 @@ cargo_build_script(
),
edition = "2021",
links = "lolhtml",
- pkg_name = "lolhtml",
+ pkg_name = "lol_html_c_api",
rustc_flags = [
"--cap-lints=allow",
],
tags = [
"cargo-bazel",
- "crate-name=lolhtml",
+ "crate-name=lol_html_c_api",
"manual",
"noclippy",
"norustfmt",
diff --git a/deps/rust/crates/defs.bzl b/deps/rust/crates/defs.bzl
index 9119ad971c9..387f95fdd88 100644
--- a/deps/rust/crates/defs.bzl
+++ b/deps/rust/crates/defs.bzl
@@ -304,7 +304,7 @@ _NORMAL_DEPENDENCIES = {
"codespan-reporting": Label("@crates_vendor__codespan-reporting-0.11.1//:codespan_reporting"),
"cxx": Label("@crates_vendor__cxx-1.0.130//:cxx"),
"flate2": Label("@crates_vendor__flate2-1.0.35//:flate2"),
- "lolhtml": Label("@crates_vendor__lolhtml-1.1.2//:lolhtml"),
+ "lol_html_c_api": Label("@crates_vendor__lol_html_c_api-1.1.2//:lolhtml"),
"nix": Label("@crates_vendor__nix-0.29.0//:nix"),
"pico-args": Label("@crates_vendor__pico-args-0.5.0//:pico_args"),
"proc-macro2": Label("@crates_vendor__proc-macro2-1.0.89//:proc_macro2"),
@@ -889,20 +889,20 @@ def crate_repositories():
maybe(
new_git_repository,
- name = "crates_vendor__lol_html-2.0.0",
- commit = "a161bb319a61ddfb4c66e29153bbf8d6491f28cf",
+ name = "crates_vendor__lol_html-2.1.0",
+ commit = "cac9f2f59aea8ad803286b0aae0d667926f441c7",
init_submodules = True,
remote = "https://github.com/cloudflare/lol-html.git",
- build_file = Label("@workerd//deps/rust/crates:BUILD.lol_html-2.0.0.bazel"),
+ build_file = Label("@workerd//deps/rust/crates:BUILD.lol_html-2.1.0.bazel"),
)
maybe(
new_git_repository,
- name = "crates_vendor__lolhtml-1.1.2",
- commit = "a161bb319a61ddfb4c66e29153bbf8d6491f28cf",
+ name = "crates_vendor__lol_html_c_api-1.1.2",
+ commit = "cac9f2f59aea8ad803286b0aae0d667926f441c7",
init_submodules = True,
remote = "https://github.com/cloudflare/lol-html.git",
- build_file = Label("@workerd//deps/rust/crates:BUILD.lolhtml-1.1.2.bazel"),
+ build_file = Label("@workerd//deps/rust/crates:BUILD.lol_html_c_api-1.1.2.bazel"),
strip_prefix = "c-api",
)
@@ -1615,7 +1615,7 @@ def crate_repositories():
struct(repo = "crates_vendor__codespan-reporting-0.11.1", is_dev_dep = False),
struct(repo = "crates_vendor__cxx-1.0.130", is_dev_dep = False),
struct(repo = "crates_vendor__flate2-1.0.35", is_dev_dep = False),
- struct(repo = "crates_vendor__lolhtml-1.1.2", is_dev_dep = False),
+ struct(repo = "crates_vendor__lol_html_c_api-1.1.2", is_dev_dep = False),
struct(repo = "crates_vendor__nix-0.29.0", is_dev_dep = False),
struct(repo = "crates_vendor__pico-args-0.5.0", is_dev_dep = False),
struct(repo = "crates_vendor__proc-macro2-1.0.89", is_dev_dep = False),
diff --git a/src/workerd/api/html-rewriter.c++ b/src/workerd/api/html-rewriter.c++
index a229238f14d..d3d594d0593 100644
--- a/src/workerd/api/html-rewriter.c++
+++ b/src/workerd/api/html-rewriter.c++
@@ -4,7 +4,7 @@
#include "html-rewriter.h"
-#include "c-api/include/lol_html.h"
+#include "lol_html.h"
#include "streams.h"
#include "util.h"