integrating rep_lang
& Holochain.
either:
git clone --recurse-submodules $URL
or, after cloning:
git submodule update --init --recursive
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
(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
# 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.
$ 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