{"id":25018002,"url":"https://github.com/flashsystems/tokio-fastcgi","last_synced_at":"2025-04-13T01:39:18.981Z","repository":{"id":53924221,"uuid":"481936830","full_name":"FlashSystems/tokio-fastcgi","owner":"FlashSystems","description":"Async FastCGI handler library for Tokio.rs","archived":false,"fork":false,"pushed_at":"2025-02-27T21:08:57.000Z","size":52,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T01:39:05.001Z","etag":null,"topics":["async","fastcgi","rust","rust-library"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlashSystems.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":"2022-04-15T11:29:12.000Z","updated_at":"2024-12-11T08:14:35.000Z","dependencies_parsed_at":"2024-07-21T19:42:35.714Z","dependency_job_id":null,"html_url":"https://github.com/FlashSystems/tokio-fastcgi","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"e93c6769e1460e9c9014bdb9d9f7cacef42926ec"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashSystems%2Ftokio-fastcgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashSystems%2Ftokio-fastcgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashSystems%2Ftokio-fastcgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlashSystems%2Ftokio-fastcgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlashSystems","download_url":"https://codeload.github.com/FlashSystems/tokio-fastcgi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654027,"owners_count":21140236,"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":["async","fastcgi","rust","rust-library"],"created_at":"2025-02-05T10:19:18.698Z","updated_at":"2025-04-13T01:39:18.934Z","avatar_url":"https://github.com/FlashSystems.png","language":"Rust","readme":"![Rust](https://img.shields.io/badge/rust-stable-brightgreen.svg)\n[![Current Version](https://img.shields.io/crates/v/tokio-fastcgi)](https://crates.io/crates/tokio-fastcgi)\n[![Docs.rs](https://docs.rs/tokio-fastcgi/badge.svg)](https://docs.rs/tokio-fastcgi)\n![License Apache 2.0](https://img.shields.io/crates/l/tokio-fastcgi)\n\n# Async FastCGI handler library\n\nThis crate implements a FastCGI handler for Tokio. It's a complete re-implementation of the FastCGI protocol in safe rust and supports all three FastCGI roles: Responder, Authorizer and Filter. The [`Role`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/enum.Role.html) enum documents the different roles and their input and output parameters.\n\nIf you just want to use this library, look at the examples, open the documentation and start using it by adding the following to the `[dependencies]` section of your `Cargo.toml`:\n\n```toml\ntokio-fastcgi = \"1\"\n```\n\n## Principle of operation\n\nThe tokio-fastcgi library handles FastCGI requests that are sent by a server. Accepting the connection and spawning a new task to handle the requests is done via Tokio. Within the handler task, [`Requests::from_split_socket`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Requests.html#method.from_split_socket) is called to create an asynchronous requests stream. Calling [`Requests::next().await`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Requests.html#method.next) on this stream will return a new [`Request`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html) instance as soon as it was completely received from the web-server.\n\nThe returned [`Request`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html) instance has a [`process`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html#method.process) method that accepts an asynchronous callback function or closure that will process the request. The current [request](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html) will be passed to the callback as a parameter and can be used to retrieve the input streams sent by the web-server and to write to the output streams. The callback returns a [result](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/enum.RequestResult.html) or an error, if processing the request failed.\n\nThis is repeated while the [`Requests`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Requests.html) instance for the connection returns more requests. If no more requests are returned, the stream will be dropped and the connection to the web-server will be closed.\n\nThis library handles connection reuse and aborting requests for the user. See [`Requests::next`](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Requests.html#method.next) for more details.\n\n## Examples\n\nThe library contains two examples: [A bare bones one](https://github.com/FlashSystems/tokio-fastcgi/blob/master/examples/simple.rs) and a litte [REST API](https://github.com/FlashSystems/tokio-fastcgi/blob/master/examples/apiserver.rs). Just have a look :)\n\n## Changelog\n\n* Version 1.0.0\\\n  Initial release\n\n* Version 1.1.0\\\n  Add methods to enumerate the parameters of a request ([params_iter](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html#method.params_iter) and [str_params_iter](https://docs.rs/tokio-fastcgi/latest/tokio_fastcgi/struct.Request.html#method.str_params_iter)).\n\n* Version 1.1.1\\\n  Update dependency versions. Make dependency to `once_cell` less restrictive.\n\n* Version 1.2.0\\\n  Fix bug #4: Under heavy load, FastCGI responses are not delivered correctly. This makes the FastCGI protocol fail and connections get dropped with various error messages. This release fixes this problem. The `tokio-fastcgi` library is now stable even under heavy load.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashsystems%2Ftokio-fastcgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflashsystems%2Ftokio-fastcgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflashsystems%2Ftokio-fastcgi/lists"}