Skip to content

garritfra/qbe-rs

QBE IR for Rust

docs Crates.io

https://c9x.me/compile/

This crate seeks to provide a Rust-y representation of QBE IR. It can be used for code generation of compilers. A way to parse existing IR is planned.

Getting Started

This crate is on crates.io, so you can simply add it as a dependency in your Cargo.toml and off you go.

If you don't know where to get started, check out the examples in the examples/ directory:

  • hello_world — the smallest possible use of the API; build a Module by hand and print it.
  • tiny_basic — an end-to-end compiler for a BASIC subset (lexer, parser, codegen) with sample .bas programs. See examples/tiny_basic/README.md for the language reference and run instructions.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.

Projects using this crate

This crate is used by the Antimony project. Check out the QBE generator to see how they are using it.

License

The qbe crate is distributed under either of

at your option.

About

QBE IR in natural Rust data structures

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors

Languages