Expand description
Code generation backends.
A backend is consititued of:
- a list of AST transformations to apply, those are called phases.
- and a printer.
This top-level module is mostly an index of available backends and a small prelude to make backend modules concise.
§Adding a new backend
- Create a submodule under
src/backends/, e.g.foo.rs. - Put your printer and backend there.
- Re-export it here with
pub mod foo;.
See rust for an example implementation.
Modules§
- lean
- The Lean backend
- rust
- A Rust backend for hax. Note: for now, this contains only a minimal skeleton of Rust printer, which serves solely as an example printer.
Traits§
- Backend
- A hax backend.
Functions§
- apply_
backend - Apply a backend to a collection of AST items, producing output files.