talira

Common interface between Haskell web applications and web servers

open sourceMITfree

WAI (Web Application Interface) is the common protocol between Haskell web applications and web servers, playing the part Rack plays for Ruby. An application written against WAI runs on any server with a WAI handler, and middleware and whole applications written for it work with any framework that targets it. Warp, from the same repository, is its main web server, and the Yesod and Scotty frameworks build on it. Its author is Michael Snoyman.

Problems it solves

  • write a Haskell web app that isn't tied to one web server
  • share middleware between Haskell web frameworks
  • plug a Haskell web framework into a fast web server

Features

  • One interface between Haskell web apps and servers
  • Apps run on any server with a WAI handler, such as Warp
  • Middleware that works with any WAI framework
  • Streaming request and response bodies

Alternatives

The same job

These do what WAI does.

  1. Servant Type-level web API DSL for Haskell: servers, clients and docs from one type
  2. Scotty Sinatra-inspired Haskell web framework on WAI and Warp

Compare WAI with the top 3