pub struct Options {Show 23 fields
pub profile: Profile,
pub opt_level: OptLevel,
pub debug_info: DebugInfo,
pub output_type: OutputType,
pub target_triple: Option<String>,
pub output_path: Option<Utf8PathBuf>,
pub import_paths: Vec<Utf8PathBuf>,
pub library_paths: Vec<Utf8PathBuf>,
pub libraries: Vec<String>,
pub warn_all: bool,
pub deny_warnings: bool,
pub emit_kernel_report: bool,
pub tensor_fusion: bool,
pub dump_ir: IrDumpOptions,
pub stdlib_path: Option<Utf8PathBuf>,
pub hackage_packages: Vec<String>,
pub compile_only: bool,
pub output_object_dir: Option<Utf8PathBuf>,
pub output_interface_dir: Option<Utf8PathBuf>,
pub package_dbs: Vec<Utf8PathBuf>,
pub package_ids: Vec<String>,
pub extensions: Vec<String>,
pub cpp_defines: Vec<String>,
}Expand description
Compiler options that can be set via CLI or configuration.
Fields§
§profile: ProfileThe compilation profile to use.
opt_level: OptLevelOptimization level.
debug_info: DebugInfoDebug information level.
output_type: OutputTypeOutput type.
target_triple: Option<String>Target triple (e.g., “x86_64-unknown-linux-gnu”).
output_path: Option<Utf8PathBuf>Output path for compiled artifacts.
import_paths: Vec<Utf8PathBuf>Search paths for module imports.
library_paths: Vec<Utf8PathBuf>Search paths for libraries.
libraries: Vec<String>Libraries to link.
warn_all: boolEnable all warnings.
deny_warnings: boolTreat warnings as errors.
emit_kernel_report: boolGenerate kernel reports (Numeric profile).
tensor_fusion: boolExplicitly enable the tensor fusion pipeline regardless of profile. The Numeric profile always fuses; this requests fusion otherwise.
dump_ir: IrDumpOptionsDump intermediate representations.
stdlib_path: Option<Utf8PathBuf>Path to the BHC standard library. Used for implicit Prelude loading and module resolution.
hackage_packages: Vec<String>Hackage package dependencies as “name:version” pairs.
Example: ["filepath:1.4.100.0", "directory:1.3.8.0"]
compile_only: boolCompile-only mode: produce .o files without linking.
output_object_dir: Option<Utf8PathBuf>Output directory for object files (used with compile_only).
output_interface_dir: Option<Utf8PathBuf>Output directory for interface files (used with compile_only).
package_dbs: Vec<Utf8PathBuf>Package database paths for dependency lookup.
package_ids: Vec<String>Exposed dependency package IDs.
extensions: Vec<String>Enabled language extensions (e.g., “OverloadedStrings”).
cpp_defines: Vec<String>CPP preprocessor defines (e.g., “FOO”, “BAR=1”).