From 5d008d7b7c22cab84d974cfb7a90a002b391538a Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 21 Dec 2018 22:14:49 +0900 Subject: docs: add BUILD.md, development guide Signed-off-by: FUJITA Tomonori --- BUILD.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 BUILD.md (limited to 'BUILD.md') diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..8dc9cc2c --- /dev/null +++ b/BUILD.md @@ -0,0 +1,22 @@ +# Development Guide + +## Building the development environment + +You need a working [Go environment](https://golang.org/doc/install) (1.11 or newer). + +```bash +$ go get -u github.com/golang/dep/cmd/dep +$ go get github.com/osrg/gobgp +$ cd $GOPATH/src/github.com/osrg/gobgp && dep ensure +``` + +Now ready to build two binaries, `cmd/gobgp` and `cmd/gobgpd`. + +## Changing the gRPC API + +If you change the gRPC API, generate `api/gobgp.pb.go` in the following way: + +```bash +$ protoc -I ~/protobuf/src -I ${GOBGP}/api --go_out=plugins=grpc:${GOBGP}/api \ + ${GOBGP}/api/gobgp.proto ${GOBGP}/api/attribute.proto ${GOBGP}/api/capability.proto +``` -- cgit v1.2.3