Company
Date Published
Oct. 6, 2020
Author
Cristhian Motoche
Word count
1697
Language
English
Hacker News points
79

Summary

This guest post by Cristhian Motoche from Stack Builders explores how Haskell can be used to target WebAssembly, which is a portable binary instruction format that executes fast in a memory-safe sandboxed environment. The author demonstrates the use of Asterius, a well-documented tool for compiling Haskell to WebAssembly, and deploys it on Cloudflare Workers, a serverless platform that allows running code on the edge of Cloudflare infrastructure. The post also covers how to create a simple Cabal project using Asterius's ahc-cabal CLI and compile it to WebAssembly with ahc-dist.