Git Product home page Git Product logo

typed-wire

Build Status Hackage

Intro

Hackage: typed-wire Stackage: typed-wire

Language independent type-safe communication

Motivation / WIP Notice

Here are some details on the library:

  • I wrote this because I have more and more micro-service architectures. The simplest form is a Haskell (REST-Api) Backend talking with an Elm/Purescript/... frontend. I got really tired of defining all data types in Haskell, Elm, PureScript, ... and writing JSON parsing/serialization functions for them in all languages. typed-wire attempts to solve this/my problem: It generates type definitions and matching JSON parsing/serialization for all target languages from a definition file. It can also generate API definitions, but this feature is not finished yet.
  • It's not ready yet - it is still missing some planned features, testing and documentation
  • It's used in production at one of my projects to ensure DRY type-safe communication between an Elm client and a Haskell server (www.bahn-buddy.de , german)
  • If anyone thinks this is cool, needs it too and would like to help out please shoot me an email :-)

Cli Usage: twirec

$ twirec --help
Generate bindings using typed-wire for different languages

Usage: twirec [--version] [-i|--include-dir DIR] [-e|--entrypoint MODULE-NAME]
              [--hs-out DIR] [--elm-out DIR] [--purescript-out DIR]
  Language-independent type-safe communication

Available options:
  -h,--help                Show this help text
  --version                Show version and exit
  -i,--include-dir DIR     Directory to search for modules
  -e,--entrypoint MODULE-NAME
                           Entrypoint for compiler
  --hs-out DIR             Generate Haskell bindings to specified dir
  --elm-out DIR            Generate Elm bindings to specified dir
  --purescript-out DIR     Generate PureScript bindings to specified dir

Install

  • Using cabal: cabal install typed-wire
  • Using Stack: stack install typed-wire
  • From Source (cabal): git clone https://github.com/typed-wire/typed-wire.git && cd typed-wire && cabal install
  • From Source (stack): git clone https://github.com/typed-wire/typed-wire.git && cd typed-wire && stack build

Misc

Supported GHC Versions

  • 7.10.2

License

Released under the MIT license. (c) 2015 - 2016 Alexander Thiemann [email protected]

Typed Wire's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.