English | 简体中文
An easy-to-use, fast, and modern build system for trunk-based development in a large-scale monorepo codebase.
First, let's see a cool demo:
The code on the master branch is the development version and should be considered as an alpha version. Please prefer using the version on the tags in your formal environment. We will release the verified version on the large-scale internal code base to the tag from time to time.
-
Version 2.0 is in release candidate! It includes the following notable changes:
- minimal Python version 2.7, support Python 3
- Support Java, scala building
- Full support for Python
- Support custom extensions
- Only use ninja as backend build system, increases speed dramatically.
Please follow the Upgrade Notes to upgrade.
Blade is designed to be a modern build system. It is powerful and easy to use. It supports building multiple languages, such as c/c++, Java, Python, Scala, protobuf, etc. It analyzes the target dependency automatically and integrates compiling, linking, testing(including incremental testing and parallel testing), and static code inspection together. It aims to improve the clarity and simplicity of the building rules for a project.
With Blade, you can compile, link, and test multiple targets by just inputting one simple command line. For example:
Build and test all targets in the common directory recursively.
blade test common...
Build and test targets as 32-bit
blade test -m32 common...
Build and test targets in debug mode
blade test -pdebug common...
And you can combine the flags:
blade test -m32 -pdebug common...
- Auto dependency analysis, includes header files and libraries.
- Test integration: built-in support of gtest. Support incremental testing and parallel testing.
- Simple syntax, easy to use.
- Simple command line interface similar to git/svn.
- Memory leak checking in tests(with gperftools).
- Bash command line completion.
- Colorful diagnostic message displaying.
- Vim integration, includes syntax highlighting, quick fix.
-
Blade is inspired by Google's public information about their build system. Here is a reference article from Google's official blog: build in cloud: how build system works.
Later in 2015, they released it with a partially rewritten version as the
bazel
open-source build system. -
Blade generates Ninja script internally, so of course it depends on Ninja.
-
Python is a powerful and easy-to-used language, we like python.
Some libraries open-sourced by Google, such as:
They are handy and powerful; we have integrated these libraries.