#named-pipe #hyper-client #pipe #hyper-http #named #hyper

hyper-named-pipe

Hyper client bindings for Windows Named Pipes

2 releases

0.1.0 Jan 24, 2024
0.1.0-rc1 Jan 20, 2024

#335 in HTTP client

Download history 34832/week @ 2024-10-13 36320/week @ 2024-10-20 34055/week @ 2024-10-27 39936/week @ 2024-11-03 36175/week @ 2024-11-10 34876/week @ 2024-11-17 35923/week @ 2024-11-24 39094/week @ 2024-12-01 36042/week @ 2024-12-08 36841/week @ 2024-12-15 20161/week @ 2024-12-22 23729/week @ 2024-12-29 35271/week @ 2025-01-05 40240/week @ 2025-01-12 40713/week @ 2025-01-19 39567/week @ 2025-01-26

158,098 downloads per month
Used in 139 crates (2 directly)

Apache-2.0

11KB
125 lines

crates.io license appveyor docs

Hyper-named-pipe: Hyper client bindings for Windows Named Pipes

Exposes a HTTP interface over Tokio's Named Pipes implementation through a Hyper Connection interface.

Install

Add the following to your Cargo.toml file

[dependencies]
hyper-named-pipe = "*"

Usage

Ensure host's are hex-encoded when passed into HyperUri as this will bypass validation.

let pipe_name = r"\\.\pipe\named-pipe";

let builder = Client::builder(TokioExecutor::new());
let client: Client<NamedPipeConnector, Full<Bytes>> = builder.build(NamedPipeConnector);

let host = hex::encode(pipe_name);
let uri_str = format!("{}://{}", NAMED_PIPE_SCHEME, host);
let url = uri_str.parse().expect("Invalid URI");

async move {
  client.get(url).await.expect("Unable to fetch URL with Hyper client");
};

Tests

It's possible to run the unit test on a unix platform using the cross helper:

cross test --target i686-pc-windows-gnu

Dependencies

~5–13MB
~148K SLoC