百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

buildit

> DevOps
开源

无需安装即可在线演示 - https://buildit.so/tryit

192 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

无需安装即可在线演示 - https://buildit.so/tryit

BuildIt   

"Every problem in Computer Science can be solved with a level of indirection and every problem in Software Engineering can be solved with a step of code-generation"

BuildIt is a a framework for rapidly developing high-performance Domain Specific Languages (DSLs) with little to no compiler knowledge. A lightweight type-based multi-stage programming framework in C++ that supports generating expresisons and rich data-dependent control flow like if-then-else conditions and for and while loops using its novel re-execution strategy for a variety of targets.

Some completed and WIP projects with BuildIt

  1. NetBlocks: A Performant, customizable and modular network stack to specialize protocols and implementations
  2. Easy-GraphIt: A 2021 LoC GraphIt compiler that generates high-performance GPU code!
  3. Mini-Einsum DSL: Compiler for Einsum-expressions on N-dimensional dense tensors in 300 LoC (CPU and GPU parallel)

BuildIt is available opensource on GitHub under the MIT license. Many more samples are available in the samples/ directory and the website

Key Features

1. A portable light-weight multi-stage library that can be used with any standard C++ compiler.

cpp
#include 
#include 
...
> g++ foo.cpp -lbuildit -I buildit/include/

2. Write expressions and statements with dyn_var variables to generate the same code. Easily port a high-performance library into a compiler by changing types of variables.

cpp
// Code written with dyn_var
for (dyn_var i = 0; i  to specialize generated code for high-performance.**
```cpp
static_var bound, block_size;
...
// Splitting of loop with known bounds
for (dyn_var i0 = 0; i0 < bound / block_size; i0 = i0 + 1) {
  for (dyn_var i1 = i0 * block_size; i1 < (i0 + 1) * block_size; i1 = i1 + 1) {
    ...
  }
}
// conditionally generate padding loops
if (bound % block_size != 0) {
  for (dyn_var i1 = (bound / block_size) * block_size; i1 < bound; i1 = i1 + 1) {
    ...
  }
}

4. Supports generation of parallel code for CPUs and GPUs with simple annotations

cpp
builder::annotate("pragma: omp parallel for");
for (dyn_var i = 0; i < 512; i = i + 1) {
  A[i] = 0;
}

Debugging support

Checkout D2X a debugging library that works in tandem with BuildIt and provides debugging support for DSLs.

Build and Run

BuildIt is a pure library framework and does not require any special compiler support. To build the library, clone the repository, navigate to the top-level directory and run (please make sure you are using GNU-make and not just make) -

make

For building the library with Debugging support, run

make DEBUG=1 

To run the samples provided with the library (that also serve as simple test cases), run -

make run

The make system will report the first failing test case if any.

To build just the library without having to build all the samples, run

make lib

BuildIt is currently under active development. More features are being added to the framework to make building DSLs easy. If you notice BuildIt not functioning correctly on certain inputs, please create an issue with the code snippet and expected behavior.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C++compilersdomain-specific-languagesstaging

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理