Quick Start

Last updated: Jul 5, 2019

Development Tools Installation

We use the NixOS toolkit to develop Holochain core and apps.
NixOS development tools run on many operating systems.
NixOS is also the OS used by automated testing and for HoloPorts.

The main components of the tooling are:

  • The Rust programming language
  • NodeJS and npm
  • Cryptographic libraries
  • Common automations and scripts
It is important these are kept consistent across compatible apps and core.
The Holonix repository tracks standard shared dependencies.
Typically you won't ever need to interact with Holonix directly.

The main Nix tools used in Holochain dev workflows are:

  • nix-shell: a managed bash shell
  • nix-env: a cross-platform package manager
Many popular package management tools target only a single OS.
NixOS package management supports most development environments.

While working on Holochain you will usually have a nix-shell active.
When you close the shell all the extra dependencies will be cleaned up.

The full suite of Nix tooling is broad and deep.
There is even a dedicated OS and functional programming language.
Learn more with the wiki or the "pills" tutorial.
The community chat at #nixos on freenode is active and helpful.

Troubleshooting note (--pure option):
By default nix-shell only adds new things to your bash shell.
Your existing setup could override nix-shell and conflict with expectations.

nix-shell --pure
Tells nix-shell to try and isolate common conflicts.
Try this option first if you see errors where others are not.
The "nix pod" in holochain core isolates more aggressively for debugging.

Basic setup

Let's start with some basics:

  • Holochain (run Holochain apps natively!)
  • The Holochain app development tool
  • The NixOS toolkit
  • A skeleton app

Select your operating system

Note on coding with Rust
You do not need to be a Rust expert to write Holochain code.
Writing validation rules for Holochain requires relatively modest Rust.
For example you can ignore most of concurrency, memory management, etc.
The Rust book is well written and detailed for beginners.
That said, Rust is a low level language.
Expect things to be somewhat verbose compared to e.g. JavaScript.

Next Steps

Go create peer to peer applications on Holochain!
Check out the Holochain Guidebook and HDK API Reference.