API reference
python:arx:arx.main.ArxMain
class ArxMain
ArxMain(input_files: list[str] = list(), output_file: str = '', is_lib: bool = False, link_mode: Literal['auto', 'pie', 'no-pie'] = 'auto')
Source: packages/arx/src/arx/main.py:869
The main class for calling Arx compiler.
Attributes
-
input_files — Type: list[str]
-
output_file — Type: str
-
is_lib — Type: bool
-
link_mode — Type: Literal[auto, pie, no-pie]
Methods
-
__init__ —
-
_build_multimodule_context — Build the IRx multi-module compilation context.
-
_build_test_runner_kwargs — Layer runner defaults, [tests] settings, and CLI args.
-
_format_ast_fallback — Format a fallback AST representation.
-
_get_astx — Build the parsed AST for the current input files.
-
_get_codegen_astx — Build the AST used for code generation.
-
_has_main_entry — Check whether the AST contains a main entry point.
-
_load_tests_settings — Load ``[tests]`` from ``.arxproject.toml`` if present.
-
_module_has_imports — Return whether one module contains import statements.
-
_resolve_output_file — Resolve the final compiler output path.
-
_walk_ast_field — Walk one AST field for fallback formatting.
-
_walk_ast_node — Walk one AST node for fallback formatting.
-
compile — Compile the given input file.
-
run — Compile the given source code.
-
run_binary — Run the generated binary.
-
run_tests — Collect and execute compiled tests from configured paths.
-
show_ast — Print the AST for the given input file.
-
show_llvm_ir — Compile into LLVM IR the given input file.
-
show_tokens — Print the AST for the given input file.
Attributes
-
is_lib —