Skip to main content

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§

fstar
The F* backend. The F* printer is still implemented in Ocaml but the phase driver uses this infrastructure
lean
The Lean backend
rust
A Rust backend (and printer) for hax.

Traits§

Backend
A hax backend.

Functions§

apply_backend
Apply a backend to a collection of AST items, producing output files.