- 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:
2026-02-23 22:06:07 +00:00
parent 71b36dc6b5
commit 4bee36eb7f
28 changed files with 889 additions and 525 deletions
+4 -2
View File
@@ -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())?;
}