Skip to content

Instantly share code, notes, and snippets.

@kejace
Last active April 19, 2016 22:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kejace/9b6ccbb14cf4fc9f0f62 to your computer and use it in GitHub Desktop.
Save kejace/9b6ccbb14cf4fc9f0f62 to your computer and use it in GitHub Desktop.
Ethereum-haskell-client in the browser roadmap

Logging thoughts and approaches on getting (parts of) the Haskell ethereum client running in the browser.

Backends

There are a number of different alternatives. In order of appearance, I estimate the following to languages to need the least amount of porting.

  • GHCJS supports full GHC
  • Haste is full Haskell but with different libraries
  • Fay is a proper subset of Haskell
  • Elm is a Haskell-like language
  • PureScript is inspired by Haskell

Stages

GHCJS

It can be a bit tricky to set up, it will only get really easy once GHC 7.10 is released on the Haskell Platform. For now I use the GHCJS Docker file, build it there in a sandbox and copy the files back into the host (I can't get GHCJS to build without cabal dependency issues).

  • ethereum-rlp is working as-is

  • ethereum-leveldb will need a workaround for the dependency of leveldb-haskell, and hence leveldb. It seems that ethereum-leveldb only uses basic functionality of leveldb-haskell (ie open/close/get/put). Possibilities are:

    • use locket directly under ethereum-leveldb. UNTESTED
    • use node-levelup with either
  • There is also low-level C code for fast nonceNonceFinder:

    • Re-write this in Haskell (already existing?)
    • Re-write in JavaScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment