Skip to content

Holochain 2nd iteration in Rust with a Redux-like architecture and a WebAssembly Ribosome.

License

Notifications You must be signed in to change notification settings

TanNgocDo/holochain-rust

 
 

Repository files navigation

Holochain-rust

Code Status Travis Codecov In Progress License: GPL v3 Twitter Follow

This is the home of the Holochain Rust library, being rewritten from Go into Rust. See https://holochain.org.

Code Status: Rust version is currently Pre-Alpha. Not for production use. The code has not yet undergone a security audit. We expect to destructively restructure code APIs and data chains until Beta. Prototype go version was unveiled at our first hackathon (March 2017), with go version Alpha 0 was released October 2017. Alpha 1 was released May 2018. We expect a developer pre-release of this Rust re-write in mid October 2018.

Holochain Links: FAQ Developer Docs White Paper

Documentation: The Book on Holochain

There is a work-in-progress book being written about holochain-rust. See the published version at the associated GitHub Pages for this repo, https://holochain.github.io/holochain-rust. See instructions for how to contribute to the book at ./doc/holochain_101/src/how_to_contribute.md.

Installation

Core Developers Only: This holochain-rust repo delivers the holochain-core rust based cargo libraries, not any end-user executables. These installation instructions are for developers of Holochain Core itself. If you are developing Holochain applications, you will want to install the hcdev command line tool to create Holochain Genome packages suitable for running in a Holochain service. If you are a Holochain end-user, either you will install Genome packages into a Holochain hApp"s service like HoloSqape, or you application will come with them built in.

Local development & testing

Make

If you are running on ubuntu or Mac OS X, and you have make installed, you can do local development by simply typing:

make which will:

  1. install (or update to) the correct version of rust
  2. build all the rust libraries

Docker

However, we mostly use docker because it"s easier to count on things working the expected way across platforms.

The docker folder contains scripts to build and run docker images.

Running tests

Run:

. docker/run-test

Code style

There is a linter/formatter enforcing code style.

Run:

. docker/run-fmt

Updating the CI Environment

The continuous integration (CI) suite executes the same . docker/run-test command that developers are encouraged to run.

What happens if I need to change that environment? E.g. what if I need a new system library dependency installed?

  • Step 1 - Add the dependency to docker/Dockerfile.ubuntu
RUN apt-get update && apt-get install --yes\
  # ... snip ...
  my-new-lib-here
  • Step 2 - Build it
. docker/build-ubuntu
  • Step 3 - Test it out
. docker/run-test
  • Step 4 - Wait a minute! The CI environment is still using the old Dockerfile!

If your changes do not break the current environment, you can submit a separate Pull Request first, and once it is merged, the CI environment should be up-to-date for your code change Pull Request.

Otherwise, you will need to speak to an admin who can force merge your full changes after testing locally.

Building for Android

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

Contribute

We accept Pull Requests and welcome your participation. Please make sure to include the issue number your branch names and use descriptive commit messages.

In Progress

Some helpful links:

Current Throughput graph:

Throughput Graph

Contributors to this project are expected to follow our development protocols & practices.

License

License: GPL v3

Copyright (C) 2018, Holochain Trust

This program is free software: you can redistribute it and/or modify it under the terms of the license p rovided in the LICENSE file (GPLv3). This program is distributed in the hope that it will be useful, bu t WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Note: We are considering other "looser" licensing options (like MIT license) but at this stage are using GPL while we"re getting the matter sorted out. See this article for some of our thinking on licensing for distributed application frameworks.

About

Holochain 2nd iteration in Rust with a Redux-like architecture and a WebAssembly Ribosome.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 94.6%
  • C++ 2.5%
  • Makefile 1.1%
  • Shell 1.1%
  • Other 0.7%