{"id":19674891,"url":"https://github.com/welf/codecrafters-http-server-rust","last_synced_at":"2026-06-17T10:32:02.515Z","repository":{"id":245196812,"uuid":"817542006","full_name":"welf/codecrafters-http-server-rust","owner":"welf","description":"Rust solutions to the http-server challenge on Codecrafters","archived":false,"fork":false,"pushed_at":"2024-06-20T00:23:55.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T05:44:38.938Z","etag":null,"topics":["codecrafters-http-server","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/welf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-20T00:20:51.000Z","updated_at":"2024-06-20T00:23:58.000Z","dependencies_parsed_at":"2024-06-20T13:12:59.390Z","dependency_job_id":null,"html_url":"https://github.com/welf/codecrafters-http-server-rust","commit_stats":null,"previous_names":["welf/codecrafters-http-server-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/welf/codecrafters-http-server-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welf%2Fcodecrafters-http-server-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welf%2Fcodecrafters-http-server-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welf%2Fcodecrafters-http-server-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welf%2Fcodecrafters-http-server-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/welf","download_url":"https://codeload.github.com/welf/codecrafters-http-server-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/welf%2Fcodecrafters-http-server-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34445179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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":["codecrafters-http-server","rust"],"created_at":"2024-11-11T17:20:09.082Z","updated_at":"2026-06-17T10:32:02.489Z","avatar_url":"https://github.com/welf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--toc:start--\u003e\n- [Challenge Status](#challenge-status)\n- [Running the Server](#running-the-server)\n\u003c!--toc:end--\u003e\n\n[![progress-banner](https://backend.codecrafters.io/progress/http-server/86635622-46d8-4e71-bff5-ac8a170d13cb)](https://app.codecrafters.io/users/codecrafters-bot?r=2qF)\n\nThis is a repo for Rust solutions to the [http-server challenge on Codecrafters](https://codecrafters.io/challenges/http-server).\n\n# Challenge Status\n\nThe entry point for this `http-server` implementation is in `src/main.rs`. This simple `http-server`\nimplementation includes:\n- [x] user-friendly API for [parsing HTTP requests](./src/http/request.rs)\n- [x] user-friendly, elegant, and type-safe API for [building HTTP responses](./src/http/response_builder.rs)\n- [x] support for concurrent connections handling [using thread pool](./src/http/thread_pool.rs) with\na configurable number of threads *(deprecated in favor of async/await)*\n- [x] support for concurrent connections handling using multi-threading with async/await\n- [x] compression support for the server using the `flate2` crate:\n  - [x] compresses the response body if the client supports it\n- support for the following endpoints:\n  - [x] `/` - returns `200 OK` status code\n  - [x] `/echo/\u003cstring_to_return\u003e` - echoes the string passed by user in the URL\n  - [x] `/user-agent` - echoes the `User-Agent` header value\n  - [x] `/files/{filename}` - returns the content of the file with the name `filename` in the specified directory\n  - [x] `/files/{filename}` - saves the content of the response to the file with the name `filename` in the specified directory\n\n# Running the Server\n\n1. Ensure you have `cargo (\u003e=1.70)` installed locally\n1. Run `./your_server.sh` to run your program, which is implemented in `src/main.rs`. This command compiles your Rust project,\nso it might be slow the first time you run the `http-server` on `http://127.0.0.1:4221`. Subsequent runs will be fast.\n1. Open a new tab in the terminal and send requests to the server using `curl` or `netcat`. To test the performance of the server,\nyou can use the [`oha` CLI tool](https://github.com/hatoo/oha) to send a large number of concurrent requests to the server and\nget the performance metrics in a nice TUI interface. An example of how to use `oha` is shown below:\n```bash\n# Send 10000 requests with 10 concurrent connections\n$ oha -n 10000 -c 10 http://127.0.0.1:4221/echo/hello\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelf%2Fcodecrafters-http-server-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelf%2Fcodecrafters-http-server-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelf%2Fcodecrafters-http-server-rust/lists"}