14 releases

0.5.0 Mar 3, 2024
0.4.3 Oct 6, 2023
0.4.2 May 12, 2023
0.3.5 Dec 2, 2021
0.1.0 Jun 20, 2020

#187 in HTTP server

Download history 5/week @ 2024-01-25 14/week @ 2024-02-15 19/week @ 2024-02-22 136/week @ 2024-02-29 30/week @ 2024-03-07 24/week @ 2024-03-14 2/week @ 2024-03-21 21/week @ 2024-03-28 19/week @ 2024-04-04

70 downloads per month
Used in flash_rust_ws

AGPL-3.0

115KB
2.5K SLoC

Project Status: Active – The project has reached a stable, usable state and is being actively developed. crates.io Released API docs GitHub GitHub Workflow Status

FastCGI implementation in pure Rust.

The focus is on the webserver/client side, but the application/server side could be added in the future.

Developed for FlashRust Webserver with focus on

  • Vectorized IO and Zero Copy
  • async IO / tokio
  • easy HTTP interfaces

Tested with:

  • Flup (Python)
  • PHP

cargo run --example webserver --features="con_pool"

Features

  • Handle UnixStream and TCPStream transparently
  • reconnect to the FCGI App if a connection is closed
  • Start an FCGI server (exec + env)
  • Support Key-Value Pairs bigger than maximum record size
  • "Full Duplex" connection to the FCGI Server/App (e.g stream STDIN and OUT at the same time)
  • con_pool should handle more than one connection 😅 and load balance
  • A dropped FCGIBody should not block a RequestID and cancel the request
  • Connection should handle overload error from FCGI app
  • Parsing for FCGI application/server side

PullRequests are welcome BTW

Other FCGI Crates

Crate Description Difference to this
fastcgi-client Async (tokio) client Different API
fastcgi Synchronous Server Synchronous. Only Server/App Side
fastcgi-sdk Bindings to the FastCGI SDK Bindings
gfcgi abandoned Only Server/App Side
fcgi Bindings yanked

Dependencies

~0.6–11MB
~88K SLoC