1use std::path::{Path, PathBuf};
2
3pub enum CompilerTarget {
4 Cranelift,
5 Llvm,
6}
7
8pub struct CompilerCtx<'a, P: AsRef<Path>> {
9 pub input_path: P,
10 pub search_paths: &'a [PathBuf],
11 pub output_json: bool,
12 pub target: CompilerTarget,
13}
14
15impl<'a, P: AsRef<Path>> CompilerCtx<'a, P> {
16 pub fn new(
17 input_path: P,
18 search_paths: &'a [PathBuf],
19 output_json: bool,
20 target: CompilerTarget,
21 ) -> Self {
22 Self {
23 input_path,
24 search_paths,
25 output_json,
26 target,
27 }
28 }
29}