Holochain Programming Resources

HDK and HDI

When you write a Holochain application, the part that lives in Holochain is called a DNA. It runs as a guest in a WebAssembly sandbox and talks to the host, or Holochain conductor, through the host API. It’s also expected to implement callbacks that the conductor needs to call at certain times. The HDK and HDI Rust crates make it easy for you write guest code that interfaces with the conductor — the HDK for your DNA’s coordinator zomes and the HDI for integrity zomes.

Conductor APIs

The conductor exposes two separate RPC APIs over WebSocket interfaces:

For both of these APIs, you make an RPC call sending a MessagePack-serialized request in a special envelope format to the conductor over WebSocket and listen for a response. The request’s envelope must contain a request ID, and the matching response will have the same ID. On the interface that exposes the app API, you can also listen for signals broadcast by cells. There are client libraries for JavaScript and Rust that make it easy to handle requests/responses and set up signal listeners.

Conductor clients

For ergonomic interaction with the two conductor APIs, there are two officially supported client implementations: one in JavaScript and one in Rust. If you intend to develop Holochain apps with a web-based UI, it is likely that all you’ll ever need is the JavaScript client.

Conductor configuration

The conductor has a few settings that can (and should) be configured via a YAML config file. We’ve provided documentation of the internal structures that hold this config; if you can picture how to serialize this to YAML in your mind, you can write a config file! (We promise we’ll produce a more readable config file guide soon.)

Binaries

There are three main developer binaries, and one user-oriented binary. You can run any of these on the command-line with the --help flag to get detailed documentation.

Libraries

The developer community has created some useful utilities, libraries, and reusable modules for you to use in your own apps.

Example applications

Studying existing Holochain applications and tutorials can provide valuable insights and inspiration for your projects. Here are some resources to explore:

Tutorials and training

While you’ll learn a lot looking at the source code from the above GitHub projects, we’ve also produced some training material as a result of running courses in collaboration with our education partner Mythosthesia.

It looks like you are using Internet Explorer. While the basic content is available, this is no longer a supported browser by the manufacturer, and no attention is being given to having IE work well here.