Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 2.89 KB

CoreDevSetup.md

File metadata and controls

67 lines (42 loc) · 2.89 KB

Holochain Core Development Environment Setup

Installation & Usage

Important: the instructions in this readme are for developers intending work on Holochain code-base itself, not Holochain application developers. If you want to use Holochain, please proceed to the instructions on the quick start installation guide: https://developer.holochain.org/start.html

The following instructions are for developing Holochain Core or the HDK itself

There are two components needed currently to run Holochain applications, the core (what's in this repo) and also the networking engine. You can install and work on core using the built-in mock network following the instructions below, but if you want to actually test out your apps using the real networking, you will have to install the networking component following the instructions in the README there. (Note: please see the instructions in the guide book for hc or the production Conductor for how to configure the tools to use and activate the networking component.

There are three approaches to building and testing Holochain: using nix-shell, make, docker:

Nix Shell (Supported: Ubuntu, Debian, Mac OS X, Vagrant & Nix OS)

The nix-shell command from the nixos team is the preferred way to work with Holochain.

NixOS is an entire operating system but the nix-shell is simply a tool to manage dependencies for an individual shell session.

To install nix-shell:

# basic deps needed on ubuntu/debian
apt-get update && apt-get install -y curl bzip2

# this installs on all (non-windows) systems
curl https://nixos.org/nix/install | sh

Follow any further instructions output to the terminal during installation.

The Holonix documentation has more information.

Troubleshooting

Default nix-shell behaviour preserves some of the user's environment, simply adding to it rather than isolating from it.

This can cause problems if your user has cruft that conflicts with what nix is doing, e.g. existing cargo or npm installations/environment variables.

If you are seeing an issue in nix-shell that others are not seeing, try using our isolation script ./scripts/nix/pod.sh to debug the command.

For example:

./nix/pod.sh 'hc-rust-test'

or even:

./nix/pod.sh hc-test

Future deployments

In the future we plan to distribute binaries through nixpkgs. This would to enable the following:

# doesn't work yet... watch this space!
nix-shell -p holochain --run holochain ...

Building for Android

Note there is an article written on how to build Holochain for Android, read it here.