| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Date: Sat, 17 Jan 2026 12:23:26 GMT
Age: 0
X-Served-By: cache-dfw-ktki8620079-DFW, cache-bom-vanm7210057-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768652606.568370,VS0,VE773
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
servant-wasm: Servant support for delivering WebAssembly
servant-wasm: Servant support for delivering WebAssembly
Downloads
- servant-wasm-0.1.1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (<5), bytestring, servant, servant-server, servant-wasm, transformers, warp [details] |
| License | BSD-3-Clause |
| Copyright | David Johnson (c) 2020 |
| Author | David Johnson |
| Maintainer | djohnson.m@gmail.com |
| Uploaded | by DavidJohnson at 2020-05-17T07:45:02Z |
| Category | Web |
| Home page | https://github.com/dmjio/servant-wasm |
| Bug tracker | https://github.com/dmjio/servant-wasm/issues |
| Distributions | |
| Executables | exe |
| Downloads | 497 total (5 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2020-05-17 [all 1 reports] |
Readme for servant-wasm-0.1.1.0
[back to package description]servant-wasm
Content-Type support for delivering WASM with servant
Usage
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.IO.Class (liftIO)
import qualified Data.ByteString as B
import Data.ByteString (ByteString)
import Data.Proxy (Proxy (Proxy))
import Network.Wai.Handler.Warp (run)
import Servant.Server (serve, Handler)
import Servant.API ((:>), Get)
import Servant.WASM (WASM)
type API = "wasm" :> Get '[WASM] ByteString
main :: IO ()
main = do
putStrLn "Running on 3000..."
run 3000 (serve (Proxy @ API) wasmHandler)
wasmHandler :: Handler ByteString
wasmHandler = liftIO (B.readFile "hello.wasm")