{"id":18765248,"url":"https://github.com/technetos/catalyst","last_synced_at":"2025-12-07T16:30:13.931Z","repository":{"id":74868698,"uuid":"163210346","full_name":"technetos/catalyst","owner":"technetos","description":"A fast and simple webserver","archived":false,"fork":false,"pushed_at":"2019-04-19T03:00:59.000Z","size":52,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T05:44:02.678Z","etag":null,"topics":["alpn","http2","rust","tls","tokio","webserver"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"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/technetos.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-26T19:17:25.000Z","updated_at":"2022-08-13T21:46:35.000Z","dependencies_parsed_at":"2024-02-14T15:16:21.025Z","dependency_job_id":null,"html_url":"https://github.com/technetos/catalyst","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fcatalyst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fcatalyst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fcatalyst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technetos%2Fcatalyst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technetos","download_url":"https://codeload.github.com/technetos/catalyst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239663367,"owners_count":19676572,"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":["alpn","http2","rust","tls","tokio","webserver"],"created_at":"2024-11-07T18:33:20.353Z","updated_at":"2025-12-07T16:30:13.897Z","avatar_url":"https://github.com/technetos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Catalyst\n\n[![CircleCI](https://circleci.com/gh/technetos/catalyst/tree/master.svg?style=svg)](https://circleci.com/gh/technetos/catalyst/tree/master)\n\nCatalyst is a lightweight, fast and simple to use webserver written on top of tokio, rustls, and h2.  \n\n## Getting Started\n\n```sh\n$ git clone https://github.com/technetos/catalyst.git\n```\n\n## Building the project\n\n```sh\n$ cargo b --release\n```\n## Running the examples\nTo run an example use  `$ cargo r --release --example \u003cname_of_example\u003e`\n\nTo run the `simple_routes` example:\n```\n$ cargo r --release --example simple_routes\nListening on: 127.0.0.1:3000\n```\nThe `simple_routes` example has the following routes\n\nMethod | URI | Payload | Expected Response\n--- | --- | --- | ---\n`GET` | `https://127.0.0.1:3000/index` | JSON | `\"hello!\"`\n\n## Basic Usage\n\n```rust\nstruct HomePage;\n\nimpl Route for HomePage {\n    type Body = Json;\n    type Future = RouteF\u003cResponse\u003e;\n\n    fn handle_request(req: Request\u003cSelf::Body\u003e) -\u003e Self::Future {\n        let parts = req.parts();\n\n        let user_settings = req.body().inner();\n\n        let res = Response::new()\n            .status(http::StatusCode::OK)\n            .content_type(\"application/json\")\n            .body(json_bytes_ok!(json!(\"hello!\")));\n\n        boxed!(OkFut(res))\n    }\n}\n\nuse http::Method;\n\nfn main() -\u003e Result\u003c(), Box\u003cStdError\u003e\u003e {\n    // Configure the server.\n    let config: Config = Config::parse_config()?;\n\n    // Define the routes.\n    let mut routing_table = RoutingTable::new();\n    routing_table\n        .at(\"/index\", Method::GET)\n        .attach(HomePage);\n        \n    // Start the server.\n    start_server(config, routing_table)?;\n    Ok(())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnetos%2Fcatalyst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnetos%2Fcatalyst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnetos%2Fcatalyst/lists"}