{"id":13440237,"url":"https://github.com/richerarc/saphir","last_synced_at":"2025-04-05T17:06:44.718Z","repository":{"id":32504665,"uuid":"135668835","full_name":"richerarc/saphir","owner":"richerarc","description":"Fully async-await http server framework","archived":false,"fork":false,"pushed_at":"2024-05-14T15:40:48.000Z","size":732,"stargazers_count":91,"open_issues_count":6,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-09-17T01:14:19.271Z","etag":null,"topics":[],"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/richerarc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-01T04:48:53.000Z","updated_at":"2024-09-16T20:49:33.000Z","dependencies_parsed_at":"2024-01-08T14:30:43.176Z","dependency_job_id":"d424f8c1-4e90-4325-80d8-8bafc6f6abd0","html_url":"https://github.com/richerarc/saphir","commit_stats":{"total_commits":263,"total_committers":22,"mean_commits":"11.954545454545455","dds":0.7034220532319392,"last_synced_commit":"4043b6695f8c91a052cf74e097a3b9a38beb80d6"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richerarc%2Fsaphir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richerarc%2Fsaphir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richerarc%2Fsaphir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richerarc%2Fsaphir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richerarc","download_url":"https://codeload.github.com/richerarc/saphir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369952,"owners_count":20927928,"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":[],"created_at":"2024-07-31T03:01:20.965Z","updated_at":"2025-04-05T17:06:44.679Z","avatar_url":"https://github.com/richerarc.png","language":"Rust","funding_links":[],"categories":["Libraries","库 Libraries","Rust","库"],"sub_categories":["Web programming","网络编程 Web programming","网页编程","web编程 Web programming"],"readme":"# ![logo]\n[![doc](https://docs.rs/saphir/badge.svg)](https://docs.rs/saphir/)\n[![crate](https://img.shields.io/crates/v/saphir.svg)](https://crates.io/crates/saphir)\n[![issue](https://img.shields.io/github/issues/richerarc/saphir.svg)](https://github.com/richerarc/saphir/issues)\n![Rust](https://github.com/richerarc/saphir/workflows/Rust/badge.svg?branch=master)\n![downloads](https://img.shields.io/crates/d/saphir.svg)\n[![license](https://img.shields.io/crates/l/saphir.svg)](https://github.com/richerarc/saphir/blob/master/LICENSE)\n[![dependency status](https://deps.rs/repo/github/richerarc/saphir/status.svg)](https://deps.rs/repo/github/richerarc/saphir)\n\n### Saphir is a fully async-await http server framework for rust\nThe goal is to give low-level control to your web stack (as hyper does) without the time consuming task of doing everything from scratch.\n\n## Quick Overview\n```rust\nuse saphir::prelude::*;\nstruct TestController {}\n#[controller]\nimpl TestController {\n    #[get(\"/{var}/print\")]\n    async fn print_test(\u0026self, var: String) -\u003e (u16, String) {\n        (200, var)\n    }\n}\nasync fn test_handler(mut req: Request) -\u003e (u16, Option\u003cString\u003e) {\n    (200, req.captures_mut().remove(\"variable\"))\n}\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), SaphirError\u003e {\n    env_logger::init();\n    let server = Server::builder()\n        .configure_listener(|l| {\n            l.interface(\"127.0.0.1:3000\")\n        })\n        .configure_router(|r| {\n            r.route(\"/{variable}/print\", Method::GET, test_handler)\n                .controller(TestController {})\n        })\n        .build();\n    \n    server.run().await\n}\n```\n\n[logo]: ./logo.svg \"Saphir Logo\"","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricherarc%2Fsaphir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricherarc%2Fsaphir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricherarc%2Fsaphir/lists"}