Skip to content

Commit f02fa51

Browse files
committed
Update README.md with code generation instructions
1 parent 179cada commit f02fa51

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

cardano-rpc/README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What's this
44

5-
The `cardano-rpc` package provides client and server haskell modules for gRPC interface of `cardano-node`.
5+
The `cardano-rpc` package provides client and server haskell modules for gRPC interface of `cardano-node`.
66
It implements [UTxO RPC](https://utxorpc.org/introduction) protobuf communication protocol specification.
77

88
## Building
@@ -14,7 +14,24 @@ You need the following dependencies installed on your system:
1414
- [`snappy`](https://github.com/google/snappy) development files (`libsnappy-dev` in Ubuntu)
1515
- [`protobuf`](https://developers.google.com/protocol-buffers/) compiler (`protobuf-compiler` in Ubuntu)
1616

17-
Then do:
17+
### Generating the Haskell code from proto definitions
18+
19+
You need to install `buf` and `proto-lens-protoc`.
20+
1. Follow the `buf` installation guide at: https://buf.build/docs/cli/installation/
21+
1. To install Haskell protobuf code compiler:
22+
```bash
23+
cabal install proto-lens-protoc
24+
```
25+
26+
1. Generate Haskell code using:
27+
```bash
28+
( cd cardano-rpc/ ; buf generate proto )
29+
```
30+
This will output the generated Haskell code into `cardano-rpc/gen` directory.
31+
32+
### Building the haskell code
33+
34+
To build the package use the following command:
1835
```bash
1936
cabal build cardano-rpc
2037
```

0 commit comments

Comments
 (0)