Re-exports§
pub use asm_generation::from_ir::compile_ir_context_to_finalized_asm;
pub use asm_generation::CompiledBytecode;
pub use asm_generation::FinalizedEntry;
pub use semantic_analysis::namespace;
pub use semantic_analysis::namespace::Namespace;
pub use language::Programs;
pub use engine_threading::Engines;
pub use type_system::*;
Modules§
- This module encapsulates generation of various elements generated internally by the compiler, e.g., unique names of variables in desugared code and similar. It also provides functions for inspecting such generated elements.
- The DeclEngine allows the compiler to add a layer of separation between AST nodes and declarations.
- Tools related to handling/recovering from Sway compile errors and reporting them to the user.
- Type checking for Sway.
Macros§
Structs§
- Configuration for the overall build and compilation process.
- Which ASM to print.
- Which IR states to print.
Enums§
Constants§
- Offset (in bytes) of the CONFIGURABLES_OFFSET section in the prelude.
- Size of the prelude’s CONFIGURABLES_OFFSET section, in bytes.
- Total size of the prelude in bytes. Instructions start right after.
Functions§
- Given the assembly (opcodes), compile to CompiledBytecode, containing the asm in bytecode form.
- Given an AST compilation result, try compiling to a
CompiledAsm
, containing the asm in opcode form (not raw bytes/bytecode). - Given input Sway source code, try compiling to a
CompiledAsm
, containing the asm in opcode form (not raw bytes/bytecode). - Given input Sway source code, compile to CompiledBytecode, containing the asm in bytecode form.
- Given an input
Arc<str>
and an optional BuildConfig, parse the input into a lexed::LexedProgram and parsed::ParseProgram. - Parses the tree kind in the input provided.
- Given bytecode, overwrite the existing offset to configurables offset in the prelude with the given one.
Type Aliases§
- Contains the lexed and parsed submodules ‘deps’ of a module.