- added support for args in Builder trait
- added is_lib arg for compiler to produce non-main assembly outputs - updated templates to use include_str
This commit is contained in:
@@ -60,7 +60,7 @@ pub fn build_project(cwd: &Path) -> Result<(), BuildError> {
|
||||
{
|
||||
fs::create_dir_all(cwd.join("artifacts"))?;
|
||||
let mut asm = Assembler::new("./main.dsa");
|
||||
asm.start();
|
||||
asm.start(());
|
||||
asm.write_result("../artifacts/out.dsb")?;
|
||||
}
|
||||
|
||||
@@ -143,8 +143,10 @@ fn build_all_dsc(path: &Path) -> Result<(), BuildError> {
|
||||
let input_path = path;
|
||||
let output_path = path.with_extension("dsa");
|
||||
|
||||
let is_lib = !(input_path.file_stem().unwrap().to_str().unwrap() == "main");
|
||||
|
||||
let mut compiler = Compiler::new(input_path);
|
||||
compiler.start();
|
||||
compiler.start(is_lib);
|
||||
compiler.write_result(output_path.clone())?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user