Skip to content
Draft
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
30 changes: 25 additions & 5 deletions src/workerd/api/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ wd_cc_library(
implementation_deps = [
"//src/workerd/io",
"//src/workerd/util:strings",
"@capnp-cpp//src/kj/compat:kj-gzip",
"@capnp-cpp//src/kj/compat:kj-tls",
],
visibility = ["//visibility:public"],
deps = [
Expand All @@ -401,9 +403,7 @@ wd_cc_library(
"//src/workerd/io:compatibility-date_capnp",
"//src/workerd/jsg",
"@capnp-cpp//src/kj:kj-async",
"@capnp-cpp//src/kj/compat:kj-gzip",
"@capnp-cpp//src/kj/compat:kj-http",
"@capnp-cpp//src/kj/compat:kj-tls",
],
)

Expand Down Expand Up @@ -528,13 +528,27 @@ wd_cc_library(
for f in [
"actor-state-test.c++",
"basics-test.c++",
"crypto/aes-test.c++",
"crypto/impl-test.c++",
"streams/queue-test.c++",
"streams/standard-test.c++",
]
]

[
kj_test(
src = f,
deps = [
"//src/workerd/io",
"//src/workerd/io:promise-wrapper",
"@ncrypto",
"@ssl",
],
)
for f in [
"crypto/aes-test.c++",
"crypto/impl-test.c++",
]
]

kj_test(
src = "data-url-test.c++",
deps = [
Expand Down Expand Up @@ -562,6 +576,7 @@ kj_test(
deps = [
"//src/workerd/io",
"//src/workerd/tests:test-fixture",
"@ssl",
],
)

Expand Down Expand Up @@ -591,12 +606,16 @@ kj_test(
":urlpattern-standard",
"//src/workerd/io",
"//src/workerd/jsg:rtti",
"@ssl",
],
)

kj_test(
src = "base64-test.c++",
deps = ["//src/workerd/tests:test-fixture"],
deps = [
":base64",
"//src/workerd/tests:test-fixture",
],
)

kj_test(
Expand All @@ -618,6 +637,7 @@ kj_test(
"//src/workerd/io",
"//src/workerd/jsg",
"//src/workerd/tests:test-fixture",
"@capnp-cpp//src/kj/compat:kj-gzip",
],
)

Expand Down
8 changes: 7 additions & 1 deletion src/workerd/api/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
#include <workerd/io/features.h>
#include <workerd/jsg/jsg.h>

#include <openssl/base.h> // for EVP_MD_CTX, X509
// Forward declarations for OpenSSL types (avoids including openssl/base.h in header)
struct x509_st;
struct env_md_ctx_st;
struct bio_st;
using X509 = struct x509_st;
using EVP_MD_CTX = struct env_md_ctx_st;
using BIO = struct bio_st;

#include <bit>

Expand Down
39 changes: 23 additions & 16 deletions src/workerd/io/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ wd_cc_library(
visibility = ["//visibility:public"],
deps = [
"//src/workerd/jsg",
"@capnp-cpp//src/capnp/compat:http-over-capnp",
"@capnp-cpp//src/kj/compat:kj-http",
],
)

Expand Down Expand Up @@ -70,11 +70,14 @@ wd_cc_library(
],
}),
implementation_deps = [
":cdp_capnp",
"//src/workerd/api:crypto-crc-impl",
"//src/workerd/api:data-url",
"//src/workerd/api/node:exceptions",
"//src/workerd/util:completion-membrane",
"//src/workerd/util:entropy",
"//src/workerd/util:header-validation",
"//src/workerd/util:immediate-crash",
"//src/workerd/util:perfetto",
"//src/workerd/util:string-buffer",
"//src/workerd/util:strings",
Expand All @@ -83,13 +86,13 @@ wd_cc_library(
"@capnp-cpp//src/kj/compat:kj-gzip",
"@nbytes",
"@simdutf",
"@ssl",
],
visibility = ["//visibility:public"],
deps = [
":actor",
":actor-id",
":actor-storage_capnp",
":cdp_capnp",
":container_capnp",
":features",
":frankenvalue",
Expand All @@ -113,8 +116,6 @@ wd_cc_library(
"//src/workerd/jsg:script",
"//src/workerd/util:checked-queue",
"//src/workerd/util:exception",
"//src/workerd/util:header-validation",
"//src/workerd/util:immediate-crash",
"//src/workerd/util:ring-buffer",
"//src/workerd/util:small-set",
"//src/workerd/util:sqlite",
Expand All @@ -124,7 +125,6 @@ wd_cc_library(
"@capnp-cpp//src/capnp/compat:http-over-capnp",
"@capnp-cpp//src/kj:kj-async",
"@ncrypto",
"@ssl",
],
)

Expand Down Expand Up @@ -204,16 +204,18 @@ wd_cc_library(
"actor-sqlite.h",
"actor-storage.h",
],
implementation_deps = [
":io-gate",
"//src/workerd/util:autogate",
"//src/workerd/util:duration-exceeded-logger",
"@capnp-cpp//src/capnp:capnp-rpc",
],
visibility = ["//visibility:public"],
deps = [
":actor-storage_capnp",
":io-gate",
":trace",
"//src/workerd/jsg:exception",
"//src/workerd/util:autogate",
"//src/workerd/util:duration-exceeded-logger",
"//src/workerd/util:sqlite",
"@capnp-cpp//src/capnp:capnp-rpc",
"@capnp-cpp//src/kj:kj-async",
],
)
Expand All @@ -222,11 +224,13 @@ wd_cc_library(
name = "frankenvalue",
srcs = ["frankenvalue.c++"],
hdrs = ["frankenvalue.h"],
implementation_deps = [
"@capnp-cpp//src/capnp:capnpc",
],
visibility = ["//visibility:public"],
deps = [
":frankenvalue_capnp",
"//src/workerd/jsg",
"@capnp-cpp//src/capnp:capnpc",
],
)

Expand All @@ -237,6 +241,8 @@ wd_cc_library(
implementation_deps = [
"//src/workerd/util:entropy",
"//src/workerd/util:thread-scopes",
"@capnp-cpp//src/capnp:capnpc",
"@capnp-cpp//src/kj/compat:kj-http",
],
visibility = ["//visibility:public"],
deps = [
Expand All @@ -245,9 +251,6 @@ wd_cc_library(
"//src/workerd/jsg:memory-tracker",
"//src/workerd/util:own-util",
"@capnp-cpp//src/capnp:capnp-rpc",
"@capnp-cpp//src/capnp:capnpc",
"@capnp-cpp//src/kj/compat:kj-http",
"@ssl",
],
)

Expand Down Expand Up @@ -307,15 +310,18 @@ wd_cc_library(
name = "worker-interface",
srcs = ["worker-interface.c++"],
hdrs = ["worker-interface.h"],
implementation_deps = [
"//src/workerd/util",
"@capnp-cpp//src/capnp:capnpc",
"@capnp-cpp//src/capnp/compat:http-over-capnp",
],
visibility = ["//visibility:public"],
deps = [
":frankenvalue_capnp",
":trace",
":worker-interface_capnp",
"//src/workerd/util",
"@capnp-cpp//src/capnp:capnp-rpc",
"@capnp-cpp//src/capnp:capnpc",
"@capnp-cpp//src/capnp/compat:http-over-capnp",
"@capnp-cpp//src/kj/compat:kj-http",
],
)

Expand Down Expand Up @@ -408,6 +414,7 @@ kj_test(
deps = [
":actor",
":io-gate",
"//src/workerd/util:autogate",
"//src/workerd/util:test",
"//src/workerd/util:test-util",
"@sqlite3",
Expand Down
6 changes: 5 additions & 1 deletion src/workerd/io/io-thread-context.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#pragma once

#include <capnp/compat/http-over-capnp.h>
#include <kj/compat/http.h>

namespace capnp {
class HttpOverCapnpFactory;
class ByteStreamFactory;
} // namespace capnp

namespace workerd {

// Thread-level stuff needed to construct a IoContext. One of these is created for each
Expand Down
1 change: 1 addition & 0 deletions src/workerd/io/worker-interface.c++
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <workerd/util/http-util.h>

#include <capnp/compat/http-over-capnp.h>
#include <kj/debug.h>

using kj::byte;
Expand Down
7 changes: 5 additions & 2 deletions src/workerd/io/worker-interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
#include <workerd/io/outcome.capnp.h>
#include <workerd/io/trace.h>
#include <workerd/io/worker-interface.capnp.h>
#include <workerd/util/http-util.h>

#include <capnp/compat/http-over-capnp.h>
#include <kj/compat/http.h>
#include <kj/debug.h>

namespace capnp {
class HttpOverCapnpFactory;
class ByteStreamFactory;
} // namespace capnp

namespace workerd {

class Frankenvalue;
Expand Down
1 change: 0 additions & 1 deletion src/workerd/jsg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ kj_test(
src = "url-test.c++",
deps = [
":url",
"@ssl",
],
)

Expand Down
Loading
Loading