Skip to content

Latest commit

 

History

History
107 lines (85 loc) · 3.31 KB

setting-up.livemd

File metadata and controls

107 lines (85 loc) · 3.31 KB

Setting up Hoon

Index

  1. Toc
  2. User
    1. Data
  3. Contributing
    1. Understanding Any Module
    2. Style Guide
    3. Writing Documents
    4. Examples Over Testing
    5. Git
    6. Hoon
    7. Iex
    8. Mnesia Vs Actor State
    9. Observer
    10. Testing
      1. Running Tests
      2. Writing Tests
  4. Visualization
    1. Actors
  5. Hoon
    1. Calling
    2. Dumping
    3. Setting Up
  6. Analysis
    1. Fema Analysis Pinger
  7. Logging
  8. Vm_interface

Getting a Good Hoon environment

A good starting point is to read Hoon's docs on environment

It's good to follow it until the section "Mount a desk"

From here we can setup the environment quite nicely

|merge %anoma our %base
|mount %anoma

From here we want to remove all the uneeded files, get it to the following state:

8 taichi@Gensokyo:~/Documents/Workspace/Hoon/zod git:master:? % tree anoma
anoma
├── mar
│   ├── hoon.hoon
│   ├── mime.hoon
│   ├── noun.hoon
│   ├── txt-diff.hoon
│   └── txt.hoon
└── sys.kelvin

2 directories, 6 files

with sys.kelvin having only [%zuse 412]

Now that we have our minimal state, we can symlink in the files in https://github.com/anoma/anoma/tree/base/hoon

into lib. It should now look something like this

9 taichi@Gensokyo:~/Documents/Workspace/Hoon/zod git:master:? % tree anoma
anoma
├── lib
│   ├── anoma.hoon -> .../hoon/anoma.hoon
│   ├── logics.hoon -> .../hoon/logics.hoon
│   ├── resource-machine.hoon -> .../hoon/resource-machine.hoon
│   └── tests.hoon -> .../hoon/tests.hoon
├── mar
│   ├── hoon.hoon
│   ├── mime.hoon
│   ├── noun.hoon
│   ├── txt-diff.hoon
│   └── txt.hoon
└── sys.kelvin

3 directories, 10 files

Now we can mount our anoma code into hoon

> |commit %anoma
>=
> =anoma -build-file /=anoma=/lib/anoma/hoon
> =resource-machine -build-file /=anoma=/lib/resource-machine/hoon
> =logics -build-file /=anoma=/lib/logics/hoon
> =tests -build-file /=anoma=/lib/tests/hoon

From here, the hoon environment is ready to be used and it should work just as Anoma uses Nock.