{"id":16475952,"url":"https://github.com/softprops/hyperlocal","last_synced_at":"2025-05-15T15:07:09.045Z","repository":{"id":43571493,"uuid":"48914619","full_name":"softprops/hyperlocal","owner":"softprops","description":"🔌 ✨rustlang hyper bindings for local unix domain sockets","archived":false,"fork":false,"pushed_at":"2024-07-22T14:49:45.000Z","size":3279,"stargazers_count":243,"open_issues_count":7,"forks_count":47,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-15T00:10:26.315Z","etag":null,"topics":["http","hyper","unix","unix-domain-socket"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-02T15:47:16.000Z","updated_at":"2025-05-13T09:32:39.000Z","dependencies_parsed_at":"2024-05-05T17:49:00.690Z","dependency_job_id":"0c14cc2e-b85c-4833-bd3c-ccec9501331f","html_url":"https://github.com/softprops/hyperlocal","commit_stats":{"total_commits":139,"total_committers":18,"mean_commits":7.722222222222222,"dds":"0.36690647482014394","last_synced_commit":"2ee4d149644600d326559af0d2b235c945b05c04"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fhyperlocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fhyperlocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fhyperlocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fhyperlocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/hyperlocal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254020,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","hyper","unix","unix-domain-socket"],"created_at":"2024-10-11T12:40:59.349Z","updated_at":"2025-05-15T15:07:04.034Z","avatar_url":"https://github.com/softprops.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n🔌 ✨\n\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\n  hyperlocal\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://github.com/hyperium/hyper\"\u003eHyper\u003c/a\u003e client and server bindings for \u003ca href=\"https://github.com/tokio-rs/tokio/tree/master/tokio-net/src/uds/\"\u003eUnix domain sockets\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca alt=\"GitHub Actions\" href=\"https://github.com/softprops/hyperlocal/actions\"\u003e\n    \u003cimg src=\"https://github.com/softprops/hyperlocal/workflows/Main/badge.svg\"/\u003e\n  \u003c/a\u003e\n  \u003ca alt=\"crates.io\" href=\"https://crates.io/crates/hyperlocal\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/hyperlocal.svg?logo=rust\"/\u003e\n  \u003c/a\u003e\n  \u003ca alt=\"docs.rs\" href=\"http://docs.rs/hyperlocal\"\u003e\n    \u003cimg src=\"https://docs.rs/hyperlocal/badge.svg\"/\u003e\n  \u003c/a\u003e\n  \u003ca alt=\"latest docs\" href=\"https://softprops.github.io/hyperlocal\"\u003e\n   \u003cimg src=\"https://img.shields.io/badge/docs-latest-green.svg\"/\u003e\n  \u003c/a\u003e\n  \u003ca alt=\"license\" href=\"LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg\"/\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nHyper is a rock solid [Rust](https://www.rust-lang.org/) HTTP client and server toolkit.\n[Unix domain sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) provide a mechanism\nfor host-local interprocess communication. `hyperlocal` builds on and complements Hyper's\ninterfaces for building Unix domain socket HTTP clients and servers.\n\nThis is useful for exposing simple HTTP interfaces for your Unix daemons in cases where you\nwant to limit access to the current host, in which case, opening and exposing tcp ports is\nnot needed. Examples of Unix daemons that provide this kind of host local interface include\n[Docker](https://docs.docker.com/engine/misc/), a process container manager.\n\n## Installation\n\nAdd the following to your `Cargo.toml` file\n\n```toml\n[dependencies]\nhyperlocal = \"0.9\"\n```\n\n## Usage\n\n### Servers\n\nA typical server can be built by creating a `tokio::net::UnixListener` and accepting connections in a loop using\n`hyper::service::service_fn` to create a request/response processing function, and connecting the `UnixStream` to it\nusing `hyper::server::conn::http1::Builder::new().serve_connection()`.\n\n`hyperlocal` provides an extension trait `UnixListenerExt` with an implementation of this.\n\nAn example is at [examples/server.rs](./examples/server.rs), runnable via `cargo run --example server`\n\nTo test that your server is working you can use an out-of-the-box tool like `curl`\n\n```sh\n$ curl --unix-socket /tmp/hyperlocal.sock localhost\n\nIt's a Unix system. I know this.\n```\n\n### Clients\n\n`hyperlocal` also provides bindings for writing unix domain socket based HTTP clients the `Client` interface from the\n`hyper-utils` crate.\n\nAn example is at [examples/client.rs](./examples/client.rs), runnable via `cargo run --example client`\n\nHyper's client interface makes it easy to send typical HTTP methods like `GET`, `POST`, `DELETE` with factory\nmethods, `get`, `post`, `delete`, etc. These require an argument that can be transformed into a `hyper::Uri`.\n\nSince Unix domain sockets aren't represented with hostnames that resolve to ip addresses coupled with network ports,\nyour standard over the counter URL string won't do. Instead, use a `hyperlocal::Uri`, which represents both file path to the domain\nsocket and the resource URI path and query string.\n\n---\n\nDoug Tangren (softprops) 2015-2024\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fhyperlocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Fhyperlocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fhyperlocal/lists"}