Commit d9df4d64 authored by eta's avatar eta
Browse files

Merge branch 'http-layer' into 'main'

Initial cut of hyper bindings as a library crate

See merge request !342
parents 7f3ea03e fc35ffd6
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ dependencies = [
 "directories",
 "futures",
 "humantime-serde",
 "hyper",
 "once_cell",
 "pin-project",
 "postage",
@@ -164,6 +163,21 @@ dependencies = [
 "tor-config",
]

[[package]]
name = "arti-hyper"
version = "0.0.4"
dependencies = [
 "anyhow",
 "arti-client",
 "hyper",
 "pin-project",
 "thiserror",
 "tokio",
 "tor-error",
 "tor-rtcompat",
 "tracing-subscriber",
]

[[package]]
name = "async-broadcast"
version = "0.3.4"
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ members = [
    "crates/arti-client",
    "crates/arti-config",
    "crates/arti-bench",
    "crates/arti-hyper",
    "crates/arti"
]

+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ thiserror = "1"
[dev-dependencies]
tor-rtcompat = { path="../tor-rtcompat", version = "0.0.4", features=["tokio", "native-tls" ] }
tokio-crate = { package = "tokio", version = "1.4", features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros" ] }
hyper = { version = "0.14", features = ["http1", "client", "runtime"] }
pin-project = "1"
tokio-util = { version = "0.6", features = ["compat"] }
anyhow = "1.0.23"
+2 −0
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ will expect a type that implements [`tor_rtcompat::Runtime`], which can be obtai

`async-std` -- Build with support for the `async_std` backend.

`native-tls` (default), `rustls` -- Select TLS libraries to support. 

`static` -- Link with static versions of your system dependencies,
including sqlite and/or openssl.

+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@ use thiserror::Error;
use tor_circmgr::TargetPorts;
use tor_error::{ErrorKind, HasKind};

use crate::TorAddrError;

/// Main high-level error type for the Arti Tor client
///
/// If you need to handle different types of errors differently, use the
@@ -248,6 +250,12 @@ impl tor_error::HasKind for ErrorDetail {
    }
}

impl From<TorAddrError> for Error {
    fn from(e: TorAddrError) -> Error {
        e.into()
    }
}

#[cfg(test)]
mod test {
    use super::*;
Loading