No description
  • Haskell 97.9%
  • HTML 2.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-08-13 17:32:43 -04:00
app Finish Chapter 3 2025-04-27 23:34:07 -04:00
src/WasmFromTheGroundUp Add WIP CH04 2025-08-13 17:32:43 -04:00
test Add WIP CH04 2025-08-13 17:32:43 -04:00
.gitignore Move to a Stack project and implement CH02 2025-04-15 22:32:26 -04:00
index.html Finish Chapter 3 2025-04-27 23:34:07 -04:00
LICENSE Move to a Stack project and implement CH02 2025-04-15 22:32:26 -04:00
package.yaml Small cleanup(?) of sleb128 2025-04-23 22:27:11 -04:00
README.md Move to a Stack project and implement CH02 2025-04-15 22:32:26 -04:00
Setup.hs Move to a Stack project and implement CH02 2025-04-15 22:32:26 -04:00
stack.yaml Pin to an LTS release; add tests 2025-04-18 17:45:11 -04:00
stack.yaml.lock Pin to an LTS release; add tests 2025-04-18 17:45:11 -04:00
wasmfromthegroundup.cabal Add WIP CH04 2025-08-13 17:32:43 -04:00

WebAssembly from the Ground Up - Haskell

⚠️Work in progress! I am only partway through the book, and will add more ports as I go.⚠️

This is a collection of code from WebAssembly from the Ground Up ported from JavaScript and Ohm to Haskell.

General Notes

  • Whereas JavaScript uses Uint8Array to represent an array of bytes, this Haskell code uses bytestring builders (Data.ByteString.Builder). The Data.ByteString.Builder module provides many helpers that WebAssembly from the Ground Up must implement from scratch for JavaScript (e.g. stringUtf8, word32LE).
  • I'm not a Haskell expert. If you have a cleaner way to implement something, send me a pull request!
  • That said, I'm trying to keep the code fairly understandable to someone with a limited knowledge of Haskell. I'm using typeclasses, but this is about as advanced as it get (at the moment). I'm intentionally doing function composition with parentheses (e.g. ()) instead of the composition operator (.) for this approachability reason.
  • My Haskell code style is probably bad and/or inconsistent, I'm not using a formatter at the moment, but I'm open to it.