ciathefed/qbe-zig
A Zig port of qbe-rs, a library for generating QBE IR programmatically.
A Zig port of qbe-rs, a library for generating QBE IR programmatically.
This library allows you to build QBE IR in pure Zig, suitable for backends, compilers, or tooling that targets QBE.
Run this command in the root of your Zig project:
zig fetch --save "git+https://github.com/ciathefed/qbe-zig#v0.1.1"
main
(bleeding edge)zig fetch --save "git+https://github.com/ciathefed/qbe-zig#main"
Add qbe-zig
to your imports in build.zig
:
const qbe = b.dependency("qbe", .{
.target = target,
.optimize = optimize,
});
const exe = b.addExecutable(.{
// ...
.root_module = b.createModule(.{
// ...
.imports = &.{
.{ .name = "qbe", .module = qbe.module("qbe") },
},
}),
});
For the full Zig-style API reference, visit:
https://ciathefed.github.io/qbe-zig
This project is licensed under the MIT License