6.1.2.4. AxivionRustFrontend¶
Use Axivion Rust compiler for analysis compilation
Compiles Rust code in the given cargo workspace. The output is held in-memory for the following analysis step.
Options¶
The following places define options that affect this rule: BuildSystemIntegration, Project-GlobalOptions
abort_on_error¶
abort_on_error : bool = True
build_path¶
build_path : bauhaus.analysis.config.PlainPath = 'target'
cargo_args¶
cargo_args : list[str] = []
cargo_env¶
cargo_env : dict[str, str | None] = {}
enable_all_features¶
enable_all_features : bool = False
features).
enable_proc_macros¶
enable_proc_macros : bool = True
This requires a proc-macro server, see proc_macro_server_path.
features¶
features : list[str] = ['default']
Use the 'default' key to enable default features.
manifest_path¶
manifest_path : bauhaus.analysis.config.ProjectRelativePath = 'None (value must be set)'
proc_macro_server_path¶
proc_macro_server_path : bauhaus.analysis.config.PlainPath | None = None
If not set and proc-macro expansion is enabled, the sysroot path is used to find a proc-macro server corresponding to the current toolchain.
run_build_scripts¶
run_build_scripts : bool = True
build.rs scripts in the workspace.
sysroot_path¶
sysroot_path
The path to the rust toolchain.Type: Sysroot | bauhaus.analysis.config.ProjectRelativePath
Default:
'discover'
If using rustup, this will be one of the toolchains installed in
$HOME/.rustup/toolchains, e.g.
$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu.
This path should contain the /bin, /etc,
/lib, /libexec, and /share
subdirectories.
Note: if a sysroot path is set, cargo will be called with the env var
RUSTUP_TOOLCHAIN set to the sysroot path.
sysroot_src_path¶
sysroot_src_path : bauhaus.analysis.config.ProjectRelativePath | None = None
This should contain the source code for the rust standard library crates:
alloc, core, proc_macro, std,
and test.
If installed with rustup add component rust-src, the sources will be
located at $SYSROOT/lib/rustlib/src/rust/library, where
$SYSROOT is the sysroot path.
If this option is not set, and the above sysroot relative path exists, it will be
used. Otherwise, if sysroot_path is set to 'discover' mode, then the
RUST_SRC_PATH environment variable will be checked, and finally, if it
is also not set, rustup component add rust-src will be run to attempt
to install the sources in the sysroot path.
Option Types¶
These types are used by options listed above:
Sysroot¶
An enumeration.discover
Userustc --print sysroot to discover the sysroot path.
This will revert to the 'none' sysroot mode if the rustc
command is not found or fails to run.
none
Do not use a sysroot path. Instead, use environment variables to find rustc.This will first check the RUSTC env var, and then search
PATH.