Skip to content

ianthehenry/toodle.studio

Repository files navigation

Turtle doodles!

I wrote this app for Chapter Ten of Janet for Mortals, as a demonstration of how to embed the Janet Programming Language into a WebAssembly app.

It began life as a heavily-simplified fork of Bauble, which is -- in my opinion -- a much more interesting graphics playground. But Toodle.Studio is stateful, and Bauble.Studio is stateless, so the Janet interop bits are a bit more interesting here.

Dependencies

Bauble requires at least Janet 1.29.1. It may work with newer versions of Janet, assuming that the image format is compatible, but it's better to update the version of Janet that Bauble includes to match your local version.

Afterwards, install JavaScript dependencies with:

$ yarn
$ (cd ui && yarn)

Building

Dev build:

$ redo

Prod build:

$ BUILD_MODE=prod redo

Lint the JS with:

(cd ui/; yarn eslint .)

After building, you can serve a local copy like this:

$ node_modules/.bin/alive-server public