Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hyper to 1.0 #563

Merged
merged 2 commits into from
Dec 4, 2023
Merged
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
118 changes: 88 additions & 30 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions crates/quickjs-wasm-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ bindgen = "0.69.1"
walkdir = "2"
anyhow.workspace = true
tokio = { version = "1.33", default-features = false, features = ["rt", "macros"] }
hyper = { version = "0.14.27", features = ["client", "http1"] }
hyper-tls = "0.5.0"
http-body-util = "0.1.0"
hyper = "1.0"
hyper-tls = "0.6.0"
hyper-util = { version = "0.1.0", features = ["http1"] }
24 changes: 15 additions & 9 deletions crates/quickjs-wasm-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
use anyhow::{anyhow, bail, Result};
use hyper::body::HttpBody;
use hyper::{Body, Client, Response};
use anyhow::{anyhow, bail, Error, Result};
use http_body_util::combinators::BoxBody;
use http_body_util::BodyExt;
use hyper::body::{Bytes, Incoming};
use hyper::Response;
use hyper_tls::HttpsConnector;
use hyper_util::client::legacy::Client;
use hyper_util::rt::TokioExecutor;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::{env, fs, process};
Expand Down Expand Up @@ -41,8 +45,9 @@ async fn download_wasi_sdk() -> Result<PathBuf> {

let mut uri = format!("https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-{major_version}/wasi-sdk-{major_version}.{minor_version}-{file_suffix}.tar.gz");

let client = Client::builder().build::<_, hyper::Body>(HttpsConnector::new());
let mut response: Response<Body> = loop {
let client = Client::builder(TokioExecutor::new())
.build::<_, BoxBody<Bytes, Error>>(HttpsConnector::new());
let mut response: Response<Incoming> = loop {
let response = client.get(uri.try_into()?).await?;
let status = response.status();
if status.is_redirection() {
Expand All @@ -61,10 +66,11 @@ async fn download_wasi_sdk() -> Result<PathBuf> {

let mut archive = fs::File::create(&archive_path)?;

while let Some(chunk) = response.body_mut().data().await {
archive.write_all(&chunk.map_err(|err| {
anyhow!("Something went wrong when downloading the WASI SDK: {err}")
})?)?;
while let Some(next) = response.frame().await {
let frame = next?;
if let Some(chunk) = frame.data_ref() {
archive.write_all(chunk)?;
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions supply-chain/audits.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ user-id = 359 # Sean McArthur (seanmonstar)
start = "2019-03-19"
end = "2024-10-27"

[[trusted.hyper-util]]
criteria = "safe-to-deploy"
user-id = 359 # Sean McArthur (seanmonstar)
start = "2022-01-15"
end = "2024-12-01"

[[trusted.io-extras]]
criteria = "safe-to-deploy"
user-id = 6825 # Dan Gohman (sunfishcode)
Expand Down
24 changes: 16 additions & 8 deletions supply-chain/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ criteria = "safe-to-deploy"
version = "0.3.1"
criteria = "safe-to-deploy"

[[exemptions.http-body]]
version = "0.4.5"
criteria = "safe-to-deploy"

[[exemptions.humantime]]
version = "2.1.0"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -405,6 +401,14 @@ criteria = "safe-to-deploy"
version = "0.10.0"
criteria = "safe-to-deploy"

[[exemptions.pin-project]]
version = "1.1.3"
criteria = "safe-to-deploy"

[[exemptions.pin-project-internal]]
version = "1.1.3"
criteria = "safe-to-deploy"

[[exemptions.pin-project-lite]]
version = "0.2.13"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -521,10 +525,6 @@ criteria = "safe-to-deploy"
version = "1.0.1"
criteria = "safe-to-deploy"

[[exemptions.socket2]]
version = "0.4.10"
criteria = "safe-to-deploy"

[[exemptions.socket2]]
version = "0.5.5"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -649,6 +649,14 @@ criteria = "safe-to-deploy"
version = "0.5.8"
criteria = "safe-to-deploy"

[[exemptions.tower]]
version = "0.4.13"
criteria = "safe-to-deploy"

[[exemptions.tower-layer]]
version = "0.3.2"
criteria = "safe-to-deploy"

[[exemptions.tower-service]]
version = "0.3.2"
criteria = "safe-to-deploy"
Expand Down
37 changes: 28 additions & 9 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,15 @@ user-login = "Amanieu"
user-name = "Amanieu d'Antras"

[[publisher.http]]
version = "0.2.9"
when = "2023-02-17"
version = "1.0.0"
when = "2023-11-15"
user-id = 359
user-login = "seanmonstar"
user-name = "Sean McArthur"

[[publisher.http-body-util]]
version = "0.1.0"
when = "2023-11-15"
user-id = 359
user-login = "seanmonstar"
user-name = "Sean McArthur"
Expand All @@ -223,15 +230,22 @@ user-login = "seanmonstar"
user-name = "Sean McArthur"

[[publisher.hyper]]
version = "0.14.27"
when = "2023-06-26"
version = "1.0.1"
when = "2023-11-16"
user-id = 359
user-login = "seanmonstar"
user-name = "Sean McArthur"

[[publisher.hyper-tls]]
version = "0.5.0"
when = "2020-12-29"
version = "0.6.0"
when = "2023-11-27"
user-id = 359
user-login = "seanmonstar"
user-name = "Sean McArthur"

[[publisher.hyper-util]]
version = "0.1.1"
when = "2023-11-17"
user-id = 359
user-login = "seanmonstar"
user-name = "Sean McArthur"
Expand Down Expand Up @@ -1335,11 +1349,16 @@ criteria = "safe-to-deploy"
version = "0.4.0"
notes = "Contains `forbid_unsafe` and only uses `std::fmt` from the standard library. Otherwise only contains string manipulation."

[[audits.bytecode-alliance.audits.httpdate]]
[[audits.bytecode-alliance.audits.http-body]]
who = "Pat Hickey <[email protected]>"
criteria = "safe-to-deploy"
version = "1.0.2"
notes = "No unsafety, no io"
version = "1.0.0-rc.2"

[[audits.bytecode-alliance.audits.http-body]]
who = "Alex Crichton <[email protected]>"
criteria = "safe-to-deploy"
delta = "1.0.0-rc.2 -> 1.0.0"
notes = "Only minor changes made for a stable release."

[[audits.bytecode-alliance.audits.id-arena]]
who = "Nick Fitzgerald <[email protected]>"
Expand Down