sendoamr / bazel-hello-world

Bazel: Monorepo with a lot of programming languages. Example of usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bazel example to develop applications with multiple programming languages.

Install

Do you need install in your machine bazel https://www.bazel.build/

Java

Build a jar bazel-bin/java/helloWorld.jar

bazel build executable //java:helloWorld

Run HelloWorl in java

bazel run //java:helloWorld

Node.js

Build a executable bazel-bin/node/helloWorld_bin.sh

bazel build //node:helloWorld

Run HelloWorl in node.js

bazel run //node:helloWorld

Python

Build a executable bazel-bin/python/helloWorld

bazel build //python:helloWorld

Run HelloWorl in python

bazel run //python:helloWorld

Shell

Build a executable bazel-bin/shell/helloWorld

bazel build //shell:helloWorld

Run HelloWorl in shell

bazel run //shell:helloWorld

Go

Build a executable bazel-bin/go/linux_amd64_stripped/helloWorld

bazel build //go:helloWorld

Run HelloWorl in go

bazel run //go:helloWorld

C

Build a executable bazel-bin/c/helloWorld

bazel build //c:helloWorld

Run HelloWorl in c

bazel run //c:helloWorld

TESTS

Build all tests

bazel test //...:all --test_output=all

Run Spific test

bazel test //{c|go|java|node|python|shell}:helloWorldTest --test_output=all

About

Bazel: Monorepo with a lot of programming languages. Example of usage


Languages

Language:Starlark 53.9%Language:Java 17.8%Language:C++ 9.0%Language:Go 8.0%Language:JavaScript 5.2%Language:Python 5.2%Language:Shell 0.9%