Updated DNA Build Tutorial

Hi everyone!

So in the few past weeks there have been major breaking changes in the tooling around holochain DNAs. Mainly, dna_util has been replaced by the hc CLI, which is still a bit experimental but stable enough to start using it. Here I’ve updated the DNA build tutorial with the latest working instructions and tooling:

This shows how to build a DNA and a happ with HDK v0.0.100 published in crates.io, and the holochain version locked via nix files.

With this and the latest article on recent breaking changes, you should be able to continue happ development. If you encounter any errors, let me know and I’ll try to update the appropriate documentation.

10 Likes

Thanks brother, but hc is not a recognised command when I try running

hc dna init DNA

Any ideas? Thanks :slight_smile:

Are you running it inside the nix shell as it is explained in the readme?

No I cant get nix shell to work and had nothing but trouble with it since day 1 so using crates directly now. @pqcdev had same issues and so uses crates work around too… how can we get it working outside nixshell? Thanks

Mmm okey so before I give you the instructions keep in mind that without nix you will unfortunately have a hard time with holochain versions. Is running nix within a Linux VM a possibility?

To install hc, run this:

cargo install --git https://github.com/holochain/holochain --rev d3a61446acaa64b1732bc0ead5880fbc5f8e3f31 hc

And since you don’t have the nix-shell you also need to upgrade manually the kestore:

cargo install --git https://github.com/holochain/lair --rev v0.0.1-alpha.11 lair-keystore
1 Like

Ok thanks, tried running the first command and I got:

error: could not find hc in GitHub - holochain/holochain: The new, performant, and simplified version of Holochain on Rust (sometimes called Holochain RSM for Refactored State Model) with version *

Any ideas? :slight_smile:

No, that’s what I have been having issues with, running in WSL2.

I was having issues with many things as can be seen in this thread (the latest was a problem with the nix groups and lock files (even removing the lock files did not help):

Cheers
D.

O shoot sorry, it’s like this:

cargo install --git https://github.com/holochain/holochain --rev d3a61446acaa64b1732bc0ead5880fbc5f8e3f31 holochain_cli

Ok great thanks. :slight_smile:

I am just trying that now…

I managed to get nixshell working but the odd thing is hc was still not found?

I thought it was suppose to be all setup and ready to go in nix-shell? It took over 1.5 hours to build on my machine! lol

Cheers
D.

Good news, I got hc working with the latest command you sent! :slight_smile: :heart:

I now managed follow your instructions and got the conductor working with ElementalChat! Yay! :slight_smile: Only took 6 months but we got there in the end! :wink: lol

Now I can finally get back to HoloNET RSM. I tried connecting and I got back the error:

Unable to connect to the remote server. No connection could be made because the target machine actively refused it. (localhost:8888)

I am running the conductor inside a nix-shell in WLS2 on Windows 10. Is the port being blocked somewhere? The odd thing this use to work fine with the old Redux version.

Any help would be really appreciated thanks. :slight_smile:

Cheers
D.

1 Like

Great guide by the way, appreciated. I noticed it is a lot more complicated with more steps than it use to be. This is what I hope to hide away under the hood with HoloNET and the Low-Code .NET HDK I have been working on (I actually finished this last Sept and was about to release it when RSM was announced, so I had to shelve it until I could add RSM support so you can imagine my frustration! :wink: lol

It dynamically generates rust and c# code from templates from a meta-model. It makes building hApps much quicker and you can also debug them because it uses rust for the DAL (Data Access Layer) and it uses C# for the BLL (Business Logic Layer). So people can focus on their app idea rather than the technical DAL stuff. This uses HoloNET under the hood to connect to the conductor. If we could have a Windows binary again I could then auto-start and shutdown the conductor like it use to before nix came along… it could also automatically package the dna/hApp etc… :slight_smile:

Oh, and it also bridges into any other platform/network/api/protocol using the OASIS API so currently it supports Holochain, EOSIO, Ethereum, MongoDB, SEEDS, Neo4j, SQLLite & IPFS. Soon ThreeFold, ActivityPub, SOLID and many more will be added… :slight_smile:

This is to allow people to bridge into Holochain and create a easy migration path to it. It also uses the best bits of each tech stack/platform to harnesses the power of unity consciousness… and removes all silos once and for all. Also when you build on it (OAPPs) you never need to migrate your code again and is always future proof because the OASIS API handles this for you… :slight_smile:

People also no longer need to keep learning new languages, stacks, etc. They just use the simple intuitive abstraction API over everything… :slight_smile:

So the only thing holding up releasing this is getting HoloNET to connect to the new RSM conductor so any help with this would be REALLY appreciated.

Oh, and myself and Walter plan to integrate GO (Generative Objects - also written in c#) and the OASIS/.NET HDK so this would be even more powerful then! :slight_smile: :heart:

Also, want to integrate into CRISPR ASAP too… :slight_smile:

Ready to live the Low Code Dream? :wink: :heart:

Cheers
D.