Skip to content

Commit

Permalink
quic
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Jan 15, 2024
1 parent bc8d00c commit 37df306
Show file tree
Hide file tree
Showing 22 changed files with 1,315 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ junit.xml

# Jupyter files
.ipynb_checkpoints/
Untitled*.ipynb
Untitled*.ipynb
111 changes: 97 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ members = [
"ext/kv",
"ext/net",
"ext/node",
"ext/quic",
"ext/url",
"ext/web",
"ext/webgpu",
Expand Down Expand Up @@ -69,6 +70,7 @@ deno_io = { version = "0.42.0", path = "./ext/io" }
deno_net = { version = "0.124.0", path = "./ext/net" }
deno_node = { version = "0.69.0", path = "./ext/node" }
deno_kv = { version = "0.40.0", path = "./ext/kv" }
deno_quic = { version = "0.1.0", path = "./ext/quic" }
deno_tls = { version = "0.119.0", path = "./ext/tls" }
deno_url = { version = "0.132.0", path = "./ext/url" }
deno_web = { version = "0.163.0", path = "./ext/web" }
Expand Down Expand Up @@ -166,6 +168,7 @@ elliptic-curve = { version = "0.13.4", features = ["alloc", "arithmetic", "ecdh"
p224 = { version = "0.13.0", features = ["ecdh"] }
p256 = { version = "0.13.2", features = ["ecdh"] }
p384 = { version = "0.13.0", features = ["ecdh"] }
quinn = "=0.10.2"

# crypto
rsa = { version = "0.9.3", default-features = false, features = ["std", "pem", "hazmat"] } # hazmat needed for PrehashSigner in ext/node
Expand Down Expand Up @@ -250,6 +253,8 @@ opt-level = 3
opt-level = 3
[profile.bench.package.deno_net]
opt-level = 3
[profile.bench.package.deno_quic]
opt-level = 3
[profile.bench.package.deno_crypto]
opt-level = 3
[profile.bench.package.deno_node]
Expand Down Expand Up @@ -306,6 +311,8 @@ opt-level = 3
opt-level = 3
[profile.release.package.deno_net]
opt-level = 3
[profile.release.package.deno_quic]
opt-level = 3
[profile.release.package.deno_web]
opt-level = 3
[profile.release.package.deno_crypto]
Expand Down
1 change: 1 addition & 0 deletions cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ mod ts {
deno_broadcast_channel::get_declaration(),
);
op_crate_libs.insert("deno.net", deno_net::get_declaration());
op_crate_libs.insert("deno.quic", deno_quic::get_declaration());

// ensure we invalidate the build properly.
for (_, path) in op_crate_libs.iter() {
Expand Down
18 changes: 15 additions & 3 deletions cli/js/40_testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ const OP_DETAILS = {
"op_host_recv_message": ["receive a message from a web worker", "terminating a `Worker`"],
"op_host_recv_ctrl": ["receive a message from a web worker", "terminating a `Worker`"],
"op_webgpu_buffer_get_map_async": ["map a WebGPU buffer", "awaiting the result of a `GPUBuffer#mapAsync` call"],
"op_webgpu_request_adapter": ["request a WebGPU adapter", "awaiting the result of a `navigator.gpu.requestAdapter` call"],
"op_webgpu_request_device": ["request a WebGPU device", "awaiting the result of a `GPUAdapter#requestDevice` call"],
"op_ws_close": ["close a WebSocket", "awaiting until the `close` event is emitted on a `WebSocket`, or the `WebSocketStream#closed` promise resolves"],
"op_webgpu_request_adapter": ["request a WebGPU adapter", "awaiting the result of a `navigator.gpu.requestAdapter` call"],
"op_webgpu_request_device": ["request a WebGPU device", "awaiting the result of a `GPUAdapter#requestDevice` call"],
"op_ws_close": ["close a WebSocket", "awaiting until the `close` event is emitted on a `WebSocket`, or the `WebSocketStream#closed` promise resolves"],
"op_ws_create": ["create a WebSocket", "awaiting until the `open` event is emitted on a `WebSocket`, or the result of a `WebSocketStream#connection` promise"],
"op_ws_next_event": ["receive the next message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
"op_ws_send_text": ["send a message on a WebSocket", "closing a `WebSocket` or `WebSocketStream`"],
Expand Down Expand Up @@ -319,6 +319,14 @@ function prettyResourceNames(name) {
return ["A TCP listener", "opened", "closed"];
case "udpSocket":
return ["A UDP socket", "opened", "closed"];
case "quicListener":
return ["A QUIC listener", "opened", "closed"];
case "quicConnection":
return ["A QUIC connection", "opened/accepted", "closed"];
case "quicSendStream":
return ["A QUIC send stream", "created", "closed"];
case "quicReceiveStream":
return ["A QUIC receive stream", "created", "closed"];
case "timer":
return ["A timer", "started", "fired/cleared"];
case "textDecoder":
Expand Down Expand Up @@ -386,6 +394,10 @@ function resourceCloseHint(name) {
return "Close the TCP listener by calling `tcpListener.close()`.";
case "udpSocket":
return "Close the UDP socket by calling `udpSocket.close()`.";
case "quicListener":
return "Close the QUIC listener by calling `quicListener.close(..)`.";
case "quicConnection":
return "Close the QUIC connection by calling `quicConnection.close(..)`.";
case "timer":
return "Clear the timer by calling `clearInterval` or `clearTimeout`.";
case "textDecoder":
Expand Down
5 changes: 5 additions & 0 deletions cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ pub(crate) static UNSTABLE_GRANULAR_FLAGS: &[(
"Enable unstable Web Worker APIs",
11,
),
(
deno_runtime::deno_quic::UNSTABLE_FEATURE_NAME,
"Enable unstable QUIC API",
12,
),
];

pub(crate) fn unstable_exit_cb(_feature: &str, api_name: &str) {
Expand Down
Loading

0 comments on commit 37df306

Please sign in to comment.