~brettgilio/orcircd

orcircd/HACKING.md -rw-r--r-- 1.5 KiB
8ca8b67fBrett Gilio Update LICENSE & LOGO graphic. 2 months ago

NOTE: This document is currently incomplete.

#Hacking

This document outlines the steps required to modify or develop orcircd. It is also useful for people wanting to inspect, refactor, or optimize the codebase.

#Setup

This project is developed using OCaml; as such, you will need the development tooling for that language. Additionally, you will need a C compiler capable of compiling at least C99 (GNU GCC is recommended). Proceed to install the following dependencies as required per your operating system.

  • opam
  • pkg-config / pkgconf
  • gcc
  • make

Next, initialize opam if you have not already done so.

$ opam init --enable-shell-hook

(The --enable-shell-hook flag will ensure that your PATH is alway set when developing orcircd.)

Once initialization completes successfully, you should proceed to create a local switch for orcircd.

$ cd ~/path/to/orcicd && opam switch create -y . --deps-only --locked

It is recommended you install a few additional packages to supply proper tooling for your editing environment. Documentation on how to configure these packages (notably merlin) is available online.

$ opam install -y merlin utop ocp-indent ocamlformat

Fetching relevant RFC component libraries developed by the orcircd team is best achieved through the orcircd-opam custom repository. Follow the setup guidelines found in the corresponding README.