Giter Site home page Giter Site logo

bazel-example-golang's Introduction

bazel-example-golang

An example project demonstrating bazel build rules for go with a local binary (go_binary) and a local library (go_library).

This requires bazel release > bazel-0.20.

$ git clone https://github.com/laramiel/bazel-example-golang.git
$ cd bazel-example-golang
$ git submodule init
$ git submodule foreach git pull origin master

$ bazel run :hello

$ bazel run :remote
$ bazel run :bare

$ git submodule update --init --recursive
$ bazel run //submodule:bare
$ bazel run //submodule:remote

$ bazel run //with_vendor:remote
$ bazel run //with_vendor:bare

Explanation

This repository works in conjunction with other git repositories to provide a demonstration of Bazel BUILD rules for golang.

Each of the remote repositories is linked into go_binary() targets in several ways:

  1. Using the WORKSPACE file to define git_repository() rules. This accounts for the :remote and :bare targets.

  2. Using git submodules to import the repository source, and using those paths. This accounts for the //submodule:bare and //submodule:remote targets.

  3. Using the VENDOR extension introduced in go1.6.

bazel-example-golang's People

Contributors

laramiel avatar paniag avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.