Skip to main content

apply_backend

Function apply_backend 

Source
pub fn apply_backend<B: Backend + 'static>(
    backend: B,
    items: Vec<Item>,
) -> Vec<File>
Expand description

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

This runs all of the backend’s Backend::phases, groups the items into modules via Backend::items_to_module, and then uses the backend’s printer to generate source files with paths determined by Backend::module_path.