{"id":20373262,"url":"https://github.com/tntmeijs/webby","last_synced_at":"2025-08-22T05:35:44.399Z","repository":{"id":52262947,"uuid":"362035858","full_name":"tntmeijs/webby","owner":"tntmeijs","description":"Rust web server implementation","archived":false,"fork":false,"pushed_at":"2021-05-08T08:51:06.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T06:20:35.048Z","etag":null,"topics":["http","rust","webserver"],"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/tntmeijs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-27T08:22:28.000Z","updated_at":"2021-05-02T21:01:31.000Z","dependencies_parsed_at":"2022-08-30T19:21:35.389Z","dependency_job_id":null,"html_url":"https://github.com/tntmeijs/webby","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/tntmeijs%2Fwebby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fwebby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fwebby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tntmeijs%2Fwebby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tntmeijs","download_url":"https://codeload.github.com/tntmeijs/webby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241921836,"owners_count":20042763,"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","rust","webserver"],"created_at":"2024-11-15T01:17:29.853Z","updated_at":"2025-03-04T20:44:10.140Z","avatar_url":"https://github.com/tntmeijs.png","language":"Rust","readme":"# Webby\r\n\r\n![Crates.io version badge](https://img.shields.io/crates/v/webby?style=for-the-badge)\r\n\r\nWebby is a simple Rust web server that supports HTTP 1.1.\r\n\r\n## Motivation\r\nThe Rust ecosystem comes with a lot of third-party web server crates.\r\nA lot of crates are absolutely brilliant, but none of them really teach you how a web server works.\r\nThis crate allows me to discover how HTTP 1.1 works, how to handle requests, asynchronous programming, and much, much more!\r\n\r\nRight now, I wouldn't recommend using this crate in any serious projects. It's simply too slow and unreliable.\r\n\r\n## Features\r\n### Create a simple HTTP server\r\n```rust\r\n// Run a server on localhost:8080\r\nfn main() {\r\n    webby::create(\"127.0.0.1\", 8080)\r\n        .start_listening();\r\n}\r\n```\r\n\r\n### Routing\r\nNo web server would be complete without any sort of routing, which is why Webby supports routing too.\r\n\r\nYou can either use functions, or lambda functions. As long as you match the expected function signature, it'll work!\r\n\r\n```rust\r\nfn index() -\u003e HttpResponse {\r\n    println!(\"This is an index route, it only ever returns HTTP 204.\");\r\n    HttpResponse::new().no_content()\r\n}\r\n\r\nfn main() {\r\n    webby::create(\"127.0.0.1\", 8080)\r\n        .add_route(HttpMethod::GET, \"/\", index)\r\n        .start_listening();\r\n}\r\n```\r\n\r\n## Pull request guide\r\n1. Create a branch from `master` using the following format: `feature/\u003cyour-feature-name-here\u003e`.\r\n2. Make your changes.\r\n3. Write unit tests.\r\n4. Test your changes.\r\n5. Rebase on `master`.\r\n6. Update the status badge in `README.md`.\r\n7. Open a pull request.\r\n8. Add a proper changelog / pull request description.\r\n\r\n## Third-party dependencies\r\nI've tried to keep Webby as simple as possible. However, some tasks are just out of scope for this project.\r\n\r\n### Demo\r\n- [Env Logger](https://crates.io/crates/env_logger) - a logger that can be configured via environment variables\r\n- [DotEnv](https://crates.io/crates/dotenv) - load environment variables from a `.env` file\r\n\r\n### Webby\r\n- [Log](https://crates.io/crates/log) - lightweight logging facade\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftntmeijs%2Fwebby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftntmeijs%2Fwebby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftntmeijs%2Fwebby/lists"}