All Projects → holochain → app-spec-rust

holochain / app-spec-rust

Licence: GPL-3.0 license
App Spec Rust HAS MOVED into holochain-rust repository!

Programming Languages

rust
11053 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Holochain app specification in Rust

App Spec Rust HAS MOVED into holochain-rust repo: https://github.com/holochain/holochain-rust/tree/develop/app_spec

Project PM Chat

This repository contains a Holochain app that functions as a living specification of Holochain and its Rust HDK (Holochain Development Toolkit).

As new features, or changes to the HDK (and the API) are being designed, they will be made concrete by adding a use case to this example app and putting those changes as a pull-request to this repository. As soon as the current master branch in https://github.com/holochain/holochain-rust implements all used features, the PR gets merged here so that this repository's master branch always reflects the feature set available in Holochain's master branch.

Please see the Contribute section for our protocol on how we do this.

Dependencies

The primary dependency is on the Holochain command line tools. These can be installed here:

The command line tools also have dependencies, needed only for the testing commands.

Nodejs and NPM, for compiling Javascript tests, Version 8 or higher

hcshell, the holochain-rust container bindings for Javascript, for executing tests

Make sure that all three of these dependencies are available as binary executables in your terminal before continuing. For this, they must all be available in your PATH environment variable. The instructions to accomplish that can be found separately at the above links. To verify it is all working, run each of the following three commands.

hc

If you see the available commands listed, they're successfully installed.

node -v

If you see vA.B.C where A, B, and C are numbers, you've got node installed.

hcshell -v

If you see hcshell X.Y, where X, and Y are numbers, you've got hcshell installed.

Run the tests

Make sure that you fully completed the installation of dependencies. Then, within the directory of this repo, cloned to your computer, run the following:

./build_and_test.sh

You should see the tests all passing successfully.

Detailed Description

In order to get from the source directory tree to a Holochain DNA package, and then test that, several steps need to be taken which are all automated.

This includes compiling any Rust code projects to WASM, and then assembling a DNA file (.hcpkg) with all configuration snippets and the WASM in it.

It will error at this point if for some reason it can't successfully build the WASM, or the DNA file.

Once this packaging is complete, there are a few more steps.

Unless they have already been installed, it will install node_modules to your test folder.

Next, it will use webpack to compile your tests into a single executable file, in test/dist/bundle.js.

Finally, it uses hcshell to run those tests, giving you the feedback you really want to test code, and develop new functionality.

Contribute

Holochain is an open source project. We welcome all sorts of participation and are actively working on increasing surface area to accept it. Please see our contributing guidelines for our general practices and protocols on participating in the community.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].