Skip to content

neighbour-hoods/social_sensemaker

Repository files navigation

social_sensemaker

integrating rep_lang & Holochain.

submodules

either:

git clone --recurse-submodules $URL

or, after cloning:

git submodule update --init --recursive

holochain-client-js wrapper setup

npm run hc-js-build:init
npm run hc-js-build

entering dev environment

install a Flakes supporting nix.

edit /etc/nix/nix.conf to include the following:

experimental-features = nix-command flakes

optionally (but strongly suggested because it will dramatically speed up first-build times), also add these lines to nix.conf in order to enable the Holochain binary caches. public keys can be checked at the substituter URLs.

substituters = https://cache.nixos.org/ https://cache.holo.host/ https://holochain-ci.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.holo.host-1:lNXIXtJgS9Iuw4Cu6X0HINLu9sTfcjEntnrgwMQIMcE= cache.holo.host-2:ZJCkX3AUYZ8soxTLfTb60g+F3MkWD7hkH9y8CgqwhDQ= holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8=

alternately, use https://github.com/nix-community/lorri[`lorri`] and https://github.com/direnv/direnv[`direnv`] to manage tooling and shell environment transparently.

then (from the repo root) run:

nix develop --impure

building & running

(inside of the dev shell, from prev section)

building:

# perhaps this can go in package.json?
npm install

npm run fe:build
npm run hc:build
npm run hc:pack

running:

npm run fe:run
npm run hc:run

running with multiple conductors

# perform above build steps
npm run hc:clean

# terminal 1-1
hc sandbox -f=9009 generate happs/social_sensemaker -r=9999 network mdns

# terminal 1-2
cargo run --bin rlp -- -f 9009 -p 9999 2> /tmp/rlp1.log

# terminal 2-1
hc sandbox -f=9008 generate happs/social_sensemaker -r=9998 network mdns

# terminal 2-2
cargo run --bin rlp -- -f 9008 -p 9998 2> /tmp/rlp2.log

create an IE in terminal 1-2 and see it appear in terminal 2-2.

sweettest tests

$ npm run hc:build
$ npm run hc:pack

# INFO
# cargo test depends on having the .happ around to be installed.
# this is due to Holochain having a high degree of "dynamism" in how it runs happs.
# I don't think we can do anything more "compile time" ish instead...
# in CI, for later, we will need to make sure the main build completes and the
# artifacts are available to the test suite...
$ cargo test

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages