11 releases

0.4.2 May 12, 2023
0.4.0 Apr 7, 2023
0.3.5 Dec 2, 2021
0.3.4 Oct 15, 2021
0.1.0 Jun 20, 2020

#1836 in Network programming

Download history 23/week @ 2023-02-10 37/week @ 2023-02-17 14/week @ 2023-02-24 13/week @ 2023-03-03 30/week @ 2023-03-10 6/week @ 2023-03-17 1/week @ 2023-03-24 20/week @ 2023-03-31 55/week @ 2023-04-07 27/week @ 2023-04-14 28/week @ 2023-04-21 10/week @ 2023-04-28 24/week @ 2023-05-05 76/week @ 2023-05-12 20/week @ 2023-05-19 21/week @ 2023-05-26

142 downloads per month
Used in flash_rust_ws

AGPL-3.0

105KB
2K 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.5–6MB
~87K SLoC