{"id":16376559,"url":"https://github.com/killercup/tokio-hyper","last_synced_at":"2025-08-01T19:07:34.665Z","repository":{"id":66475244,"uuid":"64883056","full_name":"killercup/tokio-hyper","owner":"killercup","description":"Tokio / Hyper","archived":false,"fork":false,"pushed_at":"2016-08-03T22:14:18.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T18:54:40.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killercup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2016-08-03T22:14:08.000Z","updated_at":"2017-03-27T20:17:21.000Z","dependencies_parsed_at":"2023-06-01T13:00:41.057Z","dependency_job_id":null,"html_url":"https://github.com/killercup/tokio-hyper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/killercup/tokio-hyper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Ftokio-hyper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Ftokio-hyper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Ftokio-hyper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Ftokio-hyper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killercup","download_url":"https://codeload.github.com/killercup/tokio-hyper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Ftokio-hyper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268281828,"owners_count":24225159,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T03:25:08.410Z","updated_at":"2025-08-01T19:07:34.656Z","avatar_url":"https://github.com/killercup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hyper / Tokio integration\n\nProvides a Tokio Service API on top of Hyper.\n\n## Status\n\nThis is currently a preview release and is **not** production ready.\nWork to integrate Hyper more deeply with Tokio is on going and will\nhopefully land in Hyper 0.10.\n\n## Usage\n\nHere is how you use the Hyper Service API:\n\n```rust\nextern crate tokio;\nextern crate futures;\n\n#[macro_use]\nextern crate hyper;\nextern crate tokio_hyper as http;\n\nuse tokio::Service;\nuse futures::{Future, finished};\nuse std::thread;\nuse std::time::Duration;\n\n#[derive(Clone)]\nstruct MyService;\n\nimpl Service for MyService {\n    type Req = http::Message\u003chttp::Request\u003e;\n    type Resp = http::Message\u003chttp::Response\u003e;\n    type Error = http::Error;\n    type Fut = Box\u003cFuture\u003cItem = Self::Resp, Error = http::Error\u003e\u003e;\n\n    fn call(\u0026self, req: Self::Req) -\u003e Self::Fut {\n        println!(\"REQUEST: {:?}\", req);\n\n        // Create the HTTP response with the body\n        let resp = http::Message::new(http::Response::ok())\n            .with_body(b\"this is my message\\n\".to_vec());\n\n        // Return the response as an immediate future\n        finished(resp).boxed()\n    }\n}\n\npub fn main() {\n    http::Server::new()\n        .serve(MyService)\n        .unwrap();\n\n    thread::sleep(Duration::from_secs(1_000_000));\n}\n```\n\nFor more details on the `Service` trait, see the Tokio documentation.\n\n## License\n\nTokio is primarily distributed under the terms of both the MIT license\nand the Apache License (Version 2.0), with portions covered by various\nBSD-like licenses.\n\nSee LICENSE-APACHE, and LICENSE-MIT for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Ftokio-hyper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillercup%2Ftokio-hyper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Ftokio-hyper/lists"}