Spritely Goblins v0.15.0: Goblins in the browser!
Christine Lemmer-Webber, Amy Grinn —We are thrilled to announce a long-awaited goal: Goblins in the browser!!
Hoot can now be used to compile Goblins and Goblins-using applications to WebAssembly! In fact, we even have support for our distributed programming protocol, OCapN working in the browser with Goblins-on-Hoot! Goblins now compiles to Webassembly in Hoot from the same codebase used to run Goblins in Guile's own virtual machine. This is a major step forward toward getting this software in the hands of everyday users. We hope it unlocks a new wave of innovation about what secure collaboration can look like.
As part of this release, we are introducing the websocket netlayer which will allow browser-based applications to easily connect with one another!
Also, a number of performance improvements makes this release the fastest Goblins ever!
Let's get into it!
Seeing is believing: Goblins in the browser IN ACTION!
Long-time readers may remember the goblin-chat demo we've shown off several times before:
Above you can see two Guile goblin-chat programs talking with a Racket
based goblin-chat program, demonstrating two completely different
language runtimes communicating over OCapN via Goblins. The impressive
thing about goblin-chat
is that it's only 150 lines of Goblins code
to implement both the user code and chatroom code for a peer-to-peer
chat program which authenticates messages as they come in!
Cool enough, but didn't we say Goblins works in the browser now? Wouldn't it be cool if you could try two goblin-chat programs communicating in your browser over OCapN... right here, on this page?!
Well, behold!
Peer A
Peer B
Try sending messages between Alice and Bob!
(If you don't see anything, note that this demo requires a recent browser supporting all the WebAssembly extensions used by Hoot, including Wasm GC and tail call support. Firefox and Chrome are known to work well, but Safari has issues.)
This is the VERY SAME 150 line goblin-chat program shown in the
previous gif, but compiled to Hoot and running in the browser!
(Source code for the running Webassembly code executing above;
only the ^chatroom
and spawn-user-controller-pair
code are
responsible for the chat protocol, the rest of the code is to provide
a user interface.)
These messages really are being delivered through OCapN too. We have a simplified abstract netlayer which simulates the network which we're using here. However, all the ordinary OCapN protocol operations are occuring with each message transmitted from one user to the other. This isn't only real Goblins in the browser, this is real OCapN in the browser too!
More about Goblins on Hoot
If you've been paying close attention, you may have noticed that this release of Goblins was directly preceded by the Hoot 0.6.0 release. (It's also no coincidence that the Hoot 0.6.0 release art showed the Goblins mascot and the Hoot mascot talking about going on an adventure and this release's release art shows them flying together in the sky!) Hoot 0.6.0 had a large amount of work put into it which is useful far beyond Goblins, but Hoot 0.6.0 and Goblins 0.15.0 were actively developed together. This has been many months of hard work from our team, and we are proud to see it pay off. Goblins in the browser is possible at last, opening the door for a future where Spritely's technology is in the hands of everyone!
Moreover, the foreign function interface feature of Hoot allows developers to access any part of the enormous javascript ecosystem within a Goblins app. That includes reactive frameworks, data processing, and visualization libraries that we think will benefit user experiences.
WebSocket Netlayer
We are also releasing a new netlayer specifically designed for browsers and everyday use: WebSockets!
The WebSocket NetLayer is the glue between Goblins applications written for Guile and Hoot. It is currently the first NetLayer available for both and will allow communication between them!
Having two different users across two different browsers talk to each other does require an intermediary. Thankfully our prelay netlayer works well together with the websockets netlayer, allowing users across browser pages to talk to each other.
However, our prelay netlayer is called "prelay" for a reason: it's the "pre-relay" netlayer. The actual "relay" netlayer we would like to provide for Goblins' OCapN code should be properly end-to-end encrypted. The specification for how to do this still needs to be written and agreed upon by the our team and others in the OCapN group so it can be used widely across OCapN implementations.
Because the prelay is not end-to-end encrypted, prelay providers can surveil and modify communication on the wire. This is a known concern, and we are going to use this current implementation as a stepping stone to derive the correct and fully end-to-end encrypted relay netlayer we still have planned.
Speedup!
This release of Goblins has a major speedup: 1.2-2x performance improvements for all Goblins code! Even more performance improvements are planned for upcoming releases; this is just the beginning!
Your support is appreciated!
Excited about Goblins on Hoot, or any of our other projects? Consider showing your appreciation with a donation! We recently hit our initial fundraising goal of $80,000 USD and announced a stretch goal. For the stretch goal, we will use Hoot to build a learning environment for Goblins and advance Hoot’s live hacking abilities in the process.
Monthly supporters at the silver, gold, and diamond tiers will have their names featured in the credits of Cirkoban, a small web game built with Hoot, as a display of our gratitude.
Thank you to everyone who has supported us so far!
Getting the release
This release also includes a number of other bugfixes and minor features. See the NEWS file for more information!
As usual, if you're using Guix, you can upgrade to 0.15.0 by using:
guix pull
guix install guile-goblins
Otherwise, you can find the tarball on our release page.
As a little bonus, if you like the release artwork, you can get a 4k resolution version to use as a wallpaper if you like! The artwork is made in Blender and its Grease Pencil tool; you can also download the .blend file! (Observant readers of our blog may notice that this release art is a sequel to the Hoot 0.6.0 release art... in the previous artwork, the characters discussed going on an adventure together, and here they are!)
If you're making something with Goblins or want to contribute to Goblins itself, be sure to join our community at community.spritely.institute! Thanks for following along and hope to see you there!