Skip to main content

Module generator

Module generator 

Source
Expand description

Code generator trait and output types.

Structs§

GeneratedCode
Output from code generation — consistent across all targets.
OutputFile
A single generated output file.
SourceInfo
Metadata for a source file referenced by a SourceMap.
SourceMap
Maps AIR source spans to generated code spans.
SourceMapEntry
A single source-map entry linking an AIR span to a target span.
SourceMapping
A single pointwise mapping from a position in generated code to a position in the originating Bock source.

Traits§

CodeGenerator
The trait all per-target code generators implement.

Functions§

module_declares_main_fn
Returns true if the given AIR module declares a top-level function named main. Used by the build pipeline to decide whether to append an entry-point invocation to the generated output of targets without a native main convention.
module_main_fn_is_async
Returns true if the given AIR module declares a top-level async fn main. Used by generate_project to select an async-aware entry invocation.