Holochain 0.3.1 is the newest recommended release for you to build your hApps on. It comes with a raft of performance improvements and bug fixes, and not too many breaking changes. The happy news with this release is that validation is considerably more performant, hitting fewer dependency deadlocks. (There’s other big news that developers need to know about — read below.)
This release also comes with a companion Launcher, which returns to Electron for the UI. This should help front-end devs have a more predictable development and debugging experience.
In the ecosystem, our friends at darksoil studio have come out with p2p Shipyard, a super powerful tool for building self-contained installables of your hApp for Windows, macOS, Linux, and Android (and iOS in the future)!
And finally, you can see what others are doing with Holochain on mobile; at the very end I’ll share a demo video of Relay, an Android messaging app that’ll ship on Volla Phone’s upcoming Quintus flagship smartphone.
Holochain 0.3.1: Validation performance, isolated and authenticated app interfaces, HDI/HDK changes
Release date: 11 June 2024
HDI compatibility: 0.4.x
HDK compatibility: 0.3.x
JavaScript client compatibility: 0.17.x
Rust client compatibility: 0.5.x
Tryorama compatibility: 0.16.x
Scaffolding tool: 0.3000.1
Launcher: 0.300.1
You should notice a decent improvement in the time it takes for published data to appear in the DHT, especially data that has lots of validation dependencies. That’s because the validation workflow has been rewritten. What’s changed? There’s now a single validation thread per DHT space, rather than multiple threads, which means that the validation queue can more intelligently prefetch dependencies and avoid deadlocks due to missing dependencies. There are other tweaks to validation as well, such as reducing the op validation retry timeout and making it adapt to the number of dependencies the op is waiting for.
There are some breaking changes to the P2P protocol and the database structure, meaning that peers using 0.3 won’t be able to communicate with peers using 0.2 or import an 0.2-based application’s database.
But that’s okay, because there are some breaking changes to the HDI and HDK anyway. There aren’t too many, and they should be easy to update your code for. Our core team has written a great 0.2 → 0.3 upgrade guide to help you out.
Lastly, there’s a big change to the application API: There is now only one app API WebSocket port, and each UI must pre-request an authentication token and supply it when it establishes a session. The UI will only have access to the one app it requested access for.
Fortunately most of this change has been abstracted away for you by the new releases of the JavaScript and Rust clients, and if your UI is deployed in the Launcher it’ll get an access token behind the scenes. (In fact, connecting to an app interface requires fewer parameters now — see the upgrade guide for the changes you need to make.) But if you’re writing your own client, you’ll need to get familiar with what these changes mean for establishing an authenticated connection.
If you want to read the changes in detail, read the changelog all the way back to the 20230503.003735 release.
Get it via Holonix or upgrade your existing app.
JavaScript client 0.17.0 and 0.17.1, Tryorama 0.16.0, Rust client 0.5: Updates for Holochain 0.3
The header says it all! This line of releases makes the client libraries and testing framework compatible with the preauthentication and per-app binding of the app API’s new security model. There’s also a small bugfix in the JS client to address a bug in the hash utility functions.
Check out the changelog for the Rust client for details on what’s changed — the process of preauthenticating a client connection is a little more manual than for the JavaScript client.
You can get the JS client and Tryorama from NPM and the Rust client from crates.io by updating the dependency in your package.json
and Cargo.toml
files, then following the upgrade instructions for your UI code.
hc-scaffold
0.3000.1: Streamlined flow, React and headless templates, simplified CSS
This release contains more than just an update to Holochain 0.3. A lot of polish has gone into this release, and as a sometime code reviewer I feel like this tool is coming into maturity. The developer UX has been tweaked in a lot of little ways that make it a pleasure to work with — particularly the newly streamlined “I only want a single-zome web app” flow. Now, when you run hc scaffold web-app
you’re asked if you want to create a DNA and an integrity/coordinator zome pair.
The templates, which traditionally used Material UI to make it look nice, now use a single, clean, basic stylesheet build with Tailwind CSS. The intention is that this will be easier to work with, and easier to just delete and replace with your own stylesheet.
Alternative package managers are now supported via a new -p
or --package-manager
flag — in addition to npm , you can also scaffold a project that uses pnpm, yarn, or bun to run all of the building, testing, and UI tasks in its package.json
files.
The codebase has also been cleaned up a lot. What does this mean for you? Well, if you’d like to try creating your own template, you don’t have to do everything from scratch or copy any non-UI templates — the common templates (like Tryorama tests) are now shared among UI templates.
This scaffolding tool is now available in the Holonix dev environment, so all you need to do to use it in a new project is go
nix run github:/holochain/holochain#hc-scaffold – web-app
(once you’ve installed Holonix, of course).
I’m still updating the Getting Started guide, so it’s a bit out of sync with the current state of the scaffolding tool. But honestly, it’s so easy to use that you probably won’t need my guide anyway.
Launcher 0.300.0: It’s smaller on the outside
When my colleagues showed me the latest Holochain Launcher, I was kinda startled. The Launcher I was familiar with was gone, replaced by… less. Much less. And I rather liked it!
You can tell that a lot of user experience work has gone into this Launcher. The startup UI consists of a tray icon and a little search box, similar to Spotlight on macOS.
That’s it!
I don’t have any apps installed right now, so I’ll try looking for something.
Not much there yet, but Kando looks useful, and I see a nice green ‘Verified’ badge (note: this helps protect you from accidentally installing a malicious HoloFuel lookalike that steals all your fuel — the Holochain team will be vetting all apps for now, but you can still sideload ‘unverified’ apps manually or find them in the hApp store, and there will eventually be a more scalable verification process).
The downloading spinner is simpler and easier to understand. This’ll matter less as Holochain gets faster, but at any stage of maturity it’s nice feedback.
The installation dialogue is easier to understand too. The network seed field has been renamed with less jargon, and a handy tooltip tells you what it does.
Nice, now I’ve got a kanban app installed!
I know from talking to my colleagues that there’s a lot more planned to make Launcher even nicer to use. Pretty excited about the direction things are heading.
And everything — App Store searches, app installation, and the KanDo app itself — feels a little snappier. It’s hard to measure this sort of thing as an end-user, but it feels like Holochain 0.3 is just faster and lighter on resources.
If you’re a developer, you can check that gear icon in the upper right corner, go into ‘System settings’, and install the developer tools. This lets you help host the DevHub package repository that powers the App Store, and you can also add a new hApp to the repository with only a couple clicks. (Note that we’re also working on a DevHub CLI that gives you more power over things like sharing reusable components.)
And one more thing for developers — this version of Launcher reverts back to Electron for all the UI stuff. You may remember that we replaced Electron with a similar library Tauri a year or two ago, and while it seemed to hold promise, the reality wasn’t as great as expected. The biggest issue was the webview — Tauri uses your OS’ system webview, which might be ancient and out of date with current web standards. This was causing a lot of debugging headaches for devs, because they didn’t know which browser their UI needed to target. Electron comes with a recent chromium binary, which means there’s a stable front-end target for you to work with.
Get Launcher 0.300.0 from GitHub, give it a spin, and let us know what you think!
If you’re on Ubuntu 24.04, take note: this version of Ubuntu made some annoying changes to protect you from malicious apps. You’ll need to follow our recommended steps to get the Launcher to run. (The binary you want to target is /opt/Holochain Launcher (0.3)/holochain-launcher-0.3
for the deb package and <path-to-your-app-image>/holochain-launcher-0.3-0.300.0.AppImage
for the AppImage package. In the future we’ll ship an AppArmor profile in the deb package to fix this problem.
p2p Shipyard: build your hApp for mobile and desktop OSes
darksoil studio is a small dev shop building core infrastructure for Holocain and “simple peer to peer apps for groups of people to meet their non-digital needs”. And, in order for those apps to meet people’s needs, they have to be available in ways that work for them. Nowadays, that often means an app that you can download from an app store. And mobile is a must.
So darksoil studio set out to make Holochain ready for mobile. It required a huge amount of work, but now, by bridging Holochain and Tauri, they’re able to bundle Holochain, a hApp, and a UI into an Android APK that can be submitted to the Play Store or f-droid (and EXEs for Windows, DMGs for macOS, and AppImages for Linux too).
This is pretty huge. We’ve long recognised it was necessary to get Holochain working on mobile, but needed to focus our energy on getting Holochain itself (and Holo Hosting) ready for general use. So it’s fantastic that a dev team in the ecosystem has done the work to build the critical infrastructure.
Now you can build your hApp with the tool they created, p2p Shipyard, and start testing it on (almost) all the OSes. It’s not Open-Source — yet — but it is Source-Available, so anyone can audit the code for security. Towards patterns for sustainable Open-Source development, darksoil is running an experiment with something they’re calling “retroactive crowdfunding”. Here’s what they’re promising and asking:
The p2p Shipyard is currently Source-Available, and once the retroactive crowdfunding goal is reached, it will be Free and Open Source, Forever.
Until then, a license is needed to use it, with all license fees going towards the crowdfunding goal. If you’d like a license to use the p2p Shipyard for your project, get in touch with us here!
Here’s what’s been done to make Holochain ready for mobile, if you’re curious:
- Mobile nodes can be set to have ‘zero-width arcs’ — that is, they’re full DHT peers but don’t contribute to the storage of other peers’ data. (This means you’ll want to set up something to keep the DHT available — if your userbase is big enough, the number of desktop users might be sufficient, but otherwise you may want to establish a cultural practice of asking people to leave their computer running so their peers can still get data. darksoil is also working on a local-server solution and, of course, Holo hosting will also be an option soon.)
- p2p Shipyard uses Tauri, which is currently the most viable way to integrate Holochain and a UI into a native Android or iOS app. (You can’t do it with Electron.) The darksoil team have built it as a Tauri plugin which you can fit into your build pipeline.
- There’s been work to make wasmer, the WASM VM that Holochain uses, ready for mobile. Holo itself has contributed some funds to the wasmer project to get it working in iOS, which will make it possible to build iOS apps using p2p Shipyard in the future.
- The darksoil team have done a lot of work to get Holochain building for Android and iOS — experimenting, wrestling build systems, equipping Holonix to do the right thing, reporting bugs, fixing them, and of course creating p2p Shipyard as a way to reproducibly build binaries for these OSes.
Here’s a couple screenshots of my colleague Eric using p2p Shipyard to bundle up two hApps his spinoff dev shop has been building.
And speaking of mobile…
Holochain on the Volla Phone Quintus
You’ve probably seen this already, but here’s a demo of a hApp running on a smartphone from Volla, a small German manufacturer who are passionate about serving their customers — as in, the people who buy their phones, not the ad companies peering through the airwaves at them. This means privacy-respecting alternatives to what we’re stuck with now.
The app isn’t anything ground-breaking — it’s just a chat app — but what’s amazing is that it’s running fully peer-to-peer (Volla opted to have the phone owners be active DHT participants, hosting each other’s data rather than using the zero-width arc strategy). It’s going to be accompanied by a backup app, and probably more apps in the future.
And it was made possible thanks to the wonderful community Holochain finds itself in – particularly Hedayat Abedijoo and Nick Stebbings who instigated a relationship with Volla, and darksoil who produced p2p Shipyard!
Cover photo by Bernd 📷 Dittrich on Unsplash