# I've been working on a Haskell Powered CAD Playground

**URL:** https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362
**Category:** Show and Tell
**Created:** [July 7, 2026, 8:09am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362 "2026-07-07T08:09:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![hungryjoe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hungryjoe/32/4331_2.png) [@hungryjoe](https://discourse.haskell.org/u/hungryjoe)
#### Post date: [July 7, 2026, 8:09am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/1 "2026-07-07T08:09:34Z")

</div>

[I’ve been working on a Haskell powered CAD playground](https://doscienceto.it/waterpark/).

It run’s entirely in the browser, in Web Assembly; this is made possible thanks to the [GHC WASM backend](https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta), by Cheng Shao et al.

---

<div class="post-metadata">

### Author: ![mitchmindtree](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mitchmindtree/32/3597_2.png) [@mitchmindtree](https://discourse.haskell.org/u/mitchmindtree)
#### Post date: [July 7, 2026, 9:25am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/2 "2026-07-07T09:25:55Z")

</div>

Very nice!

Does the WASM blob itself include some subset of GHC compiled to WASM in order to compile these examples in the web? Or is it a custom smaller compiler?

Out of curiosity, have you put much effort into optimising the WASM blob size yet? Curious if this 100MB is already stripped down, or if there might be some breathing room there.

I’ve been growing more and more curious about functional languages as a foundation for CAD lately, seems like a rich space to explore with lots of potential. Thanks for sharing!

---

<div class="post-metadata">

### Author: ![hungryjoe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hungryjoe/32/4331_2.png) [@hungryjoe](https://discourse.haskell.org/u/hungryjoe)
#### Post date: [July 7, 2026, 10:15am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/3 "2026-07-07T10:15:57Z")

</div>

> Does the WASM blob itself include some subset of GHC compiled to WASM in order to compile these examples in the web? Or is it a custom smaller compiler?

It’s using a subset of GHC; the setup I’m using is heavily based on the example in this post by @TerrorJack

> [@Ghc now runs in your browser](https://discourse.haskell.org/t/ghc-now-runs-in-your-browser/13169):
>
> ghc itself can now run purely client-side in the browser, here’s a haskell playground demo. terms and conditions apply, and i’ll write up more detailed explanation some time later, but i thought this is a cool thing to show off how far the ghc wasm backend has advanced slight_smile

> Out of curiosity, have you put much effort into optimising the WASM blob size yet? Curious if this 100MB is already stripped down, or if there might be some breathing room there.

I’ve not put a huge amount of effort into this yet. My suspicion is that “A compiler” and “A Geometry Kernel” are both sufficiently complicated things that most of the blob is going to be necessary, but I say that with limited confidence.

> I’ve been growing more and more curious about functional languages as a foundation for CAD lately, seems like a rich space to explore with lots of potential. Thanks for sharing!

You should checkout [Waterfall-CAD](https://github.com/joe-warren/opencascade-hs#-1), my library which is the core of this playground, I use it extensively for design for [3D-Printing](https://doscienceto.it/blog/posts/2024-06-30-things-ive-3d-printed-in-haskell.html), we’ve got a[Discord server](https://github.com/joe-warren/opencascade-hs#get-in-touch) with a number of people interested in FP for Programmable CAD

---

<div class="post-metadata">

### Author: ![hungryjoe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hungryjoe/32/4331_2.png) [@hungryjoe](https://discourse.haskell.org/u/hungryjoe)
#### Post date: [July 7, 2026, 11:58am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/4 "2026-07-07T11:58:12Z")

</div>

It might be worth pointing out that you can use the “loadURL” button to open files from Github (or Github Gists, just paste in the “raw” link), and even permalink to them, like so:

> **[Waterfall CAD Playground](https://doscienceto.it/waterpark/?program=https%3A%2F%2Fgist.githubusercontent.com%2Fjoe-warren%2F77fc7c96aa3071b2f1da1b0f03ed1af6%2Fraw%2F78ab91984c589ea48f678b6e85a525d1826bc37d%2FHelloDiscourse.hs&file=https%3A%2F%2Fraw.githubusercontent.com%2Fjoe-warren%2Fopencascade-hs%2Frefs%2Fheads%2Fmain%2Fwaterfall-cad-examples%2Ftest-data%2Ffonts%2Fvarela%2FVarelaRound-Regular.ttf)**

---

<div class="post-metadata">

### Author: ![simonmic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/simonmic/32/1796_2.png) [@simonmic](https://discourse.haskell.org/u/simonmic)
#### Post date: [July 7, 2026, 12:08pm UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/5 "2026-07-07T12:08:57Z")

</div>

The high bandwidth warning is very clear and considerate, nice job.

---

<div class="post-metadata">

### Author: ![augustss](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/augustss/32/887_2.png) [@augustss](https://discourse.haskell.org/u/augustss)
#### Post date: [July 9, 2026, 11:29pm UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/6 "2026-07-09T23:29:41Z")

</div>

Do you have a link to a repo?

---

<div class="post-metadata">

### Author: ![hasufell](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/hasufell/32/1250_2.png) [@hasufell](https://discourse.haskell.org/u/hasufell)
#### Post date: [July 10, 2026, 4:59am UTC](https://discourse.haskell.org/t/ive-been-working-on-a-haskell-powered-cad-playground/14362/7 "2026-07-10T04:59:55Z")

</div>

> **[opencascade-hs/playground at main · joe-warren/opencascade-hs](https://github.com/joe-warren/opencascade-hs/tree/main/playground)**
>
> main/playground
