Getting started with CLB
The way you use CLB mostly depends on the mode you want to use. Please refer to the variants of use page to figure out which one better suits your needs.
Using standalone CLB library
Use one of the following methods and refer to the library API.
Using CLB from GitHub
Use source-repository-package
with the latest revision in the tag
field
to add CLB library from clb
subfolder to your project in
cabal.project
:
source-repository-package
type: git
location: https://github.com/mlabs-haskell/clb
tag: 080e2b4852f162d33e8a3d5e2faaa9b5400d878c
subdir:
clb
Using CLB from CHaP
Currently, CLB is not on the CHaP, but we have plans (opens in a new tab) to do that.
Using CLB library with Atlas
Unfortunately, Atlas setup currently is more involved. You can find an example in this repository (opens in a new tab).
For further information please refer to this page.
Using CLB executable
In case you want to use CLB in the node emulation mode you need only the executable.
Please refer to this page for further information.
Using CLB executable with Nix
For a Nix setup, you can use the flake.nix
directly:
...
inputs = {
...
# CLB emulator
clb.url = "github:mlabs-haskell/clb";
...
clb = clb.packages.${system}."socket-emulator:exe:cardano-node-socket-emulator";
...
Building executable locally
Alternatively, you can build the executable locally, please refer to build page to get to the devshell. You can find the executable after building CLB:
$ cabal list-bin cardano-node-socket-emulator
.../clb/dist-newstyle/.../cardano-node-socket-emulator