Module backends

Module backends 

Source
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

  1. Create a submodule under src/backends/, e.g. foo.rs.
  2. Put your printer and backend there.
  3. 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.