neighbour-hoods / social_sensemaker

integration of `rep_lang` and Holochain
Other
25 stars 2 forks source link
holochain interpreters programming-languages rust

= social_sensemaker

integrating rep_lang & Holochain.

== submodules

either:

[source]

git clone --recurse-submodules $URL

or, after cloning:

[source]

git submodule update --init --recursive

== holochain-client-js wrapper setup

[source]

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

== entering dev environment

install a https://nixos.wiki/wiki/Flakes#Installing_flakes[Flakes] supporting https://nixos.org/download.html[`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:

[source]

perhaps this can go in package.json?

npm install

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

running:

[source]

npm run fe:run npm run hc:run

=== running with multiple conductors

[source]

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

[source]

$ 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