870b5fe2f6dde746754ebee1fe6b2eb57909ccd8
[govpp.git] / docs / ADAPTERS.md
1 # Adapters
2
3 ## Pure-Go implementation (recommended)
4
5 GoVPP now supports pure Go implementation for VPP binary API. This does
6 not depend on CGo or any VPP library and can be easily compiled.
7
8 There are two packages providing pure Go implementations in GoVPP:
9 - [`socketclient`](adapter/socketclient) - for VPP binary API (via unix socket)
10 - [`statsclient`](adapter/statsclient) - for VPP stats API (via shared memory)
11
12 ## CGo wrapper for vppapiclient library (deprecated)
13
14 GoVPP also provides vppapiclient package which actually uses
15 `vppapiclient.so` library from VPP codebase to communicate with VPP API.
16 To build GoVPP, `vpp-dev` package must be installed,
17 either [from packages][from-packages] or [from sources][from-sources].
18
19 To build & install `vpp-dev` from sources:
20
21 ```sh
22 git clone https://gerrit.fd.io/r/vpp
23 cd vpp
24 make install-dep
25 make pkg-deb
26 cd build-root
27 sudo dpkg -i vpp*.deb
28 ```
29
30 To build & install GoVPP:
31
32 ```sh
33 go get -u git.fd.io/govpp.git
34 cd $GOPATH/src/git.fd.io/govpp.git
35 make test
36 make install
37 ```