Popularity
2.2
Growing
Activity
0.0
Stable
4
2
0
Monthly Downloads: 1
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Latest version: v0.1.0.0
servant-wasm alternatives and similar packages
Based on the "servant" category.
Alternatively, view servant-wasm alternatives based on common mentions on social networks and blogs.
-
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
servant-elm
Automatically derive Elm functions to query servant webservices -
servant-purescript
Translate servant API to purescript code, with the help of purescript-bridge. -
servant-swagger-ui
Provide embedded swagger UI for servant and swagger -
servant-response
Moved to http://github.com/haskell-servant -
servant-js
Automatically derive javascript functions to query servant webservices. -
servant-auth-cookie
Authentication via encrypted cookies -
servant-aeson-specs
Generically obtain tests for JSON serialization -
servant-pandoc
Render a servant API to Pandoc's native representation -
servant-mock
Derive a mock server for free from your servant API types -
servant-github-webhook
Servant combinators for writing secure GitHub webhooks -
servant-matrix-param
Matrix parameter combinator for servant -
servant-auth-token-acid
Servant based API and server for token based authorisation -
servant-auth-token-leveldb
Servant based API and server for token based authorisation -
servant-jsonrpc
Tools to build JSON-RPC clients and servers the Servant way -
servant-reason
Automatically derive bindings for Servant APIs in Reason -
servant-match
Standalone implementation of servant’s dispatching mechanism -
servant-kotlin
Automatically derive Kotlin functions to query servant webservices -
servant-http2-client
Generate http2-client from Servant APIs -
servant-ruby
Create a Ruby client from a Servant API using Net::HTTP. -
servant-options
Provide responses to OPTIONS requests for Servant applications. -
servant-generate
Generate default implementations for servers in a flexible way (a.k.a servant-mock on steroids) -
servant-haxl-client
automatical derivation of querying functions for servant webservices -
servant-proto-lens
Servant Content-Type for proto-lens protobuf modules. -
servant-multipart
multipart/form-data (e.g file upload) support for servant
Learn any GitHub repo in 59 seconds
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
Promo
getonboard.dev
Do you think we are missing an alternative of servant-wasm or a related project?
README
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")
and corresponding JS to fetch WASM client-side.
const importObject = {};
WebAssembly.instantiateStreaming(fetch('/wasm'), importObject).then(results => {
// Do something with the results!
});
*Note that all licence references and agreements mentioned in the servant-wasm README section above
are relevant to that project's source code only.