Skip to content

Commit

Permalink
quic
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Feb 2, 2024
1 parent 3f4639c commit 0784fdd
Show file tree
Hide file tree
Showing 21 changed files with 1,518 additions and 31 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
109 changes: 95 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 @@ -21,6 +21,7 @@ members = [
"ext/napi",
"ext/net",
"ext/node",
"ext/quic",
"ext/url",
"ext/web",
"ext/webgpu",
Expand Down Expand Up @@ -79,6 +80,7 @@ deno_webgpu = { version = "0.103.0", path = "./ext/webgpu" }
deno_webidl = { version = "0.136.0", path = "./ext/webidl" }
deno_websocket = { version = "0.141.0", path = "./ext/websocket" }
deno_webstorage = { version = "0.131.0", path = "./ext/webstorage" }
deno_quic = { version = "0.1.0", path = "./ext/quic" }

aes = "=0.8.3"
anyhow = "1.0.57"
Expand Down Expand Up @@ -168,6 +170,7 @@ url = { version = "2.3.1", features = ["serde", "expose_internals"] }
uuid = { version = "1.3.0", features = ["v4"] }
webpki-roots = "0.25.2"
zstd = "=0.12.4"
quinn = { version = "=0.10.2", default-features = false, features = ["runtime-tokio", "tls-rustls"] }

# crypto
hkdf = "0.12.3"
Expand Down Expand Up @@ -252,6 +255,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 @@ -308,6 +313,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 @@ -159,6 +159,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_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,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 @@ -376,6 +376,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 @@ -443,6 +451,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
Loading

0 comments on commit 0784fdd

Please sign in to comment.