- 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
+1 -1
View File
@@ -5,7 +5,7 @@ edition.workspace = true
authors.workspace = true
[[bin]]
name = "assembler"
name = "dsa-a"
path = "src/main.rs"
[lib]
+2 -1
View File
@@ -58,6 +58,7 @@ impl From<AssembleError> for BuildError {
impl Builder for Assembler {
type Output = Vec<u8>;
type Args = ();
fn logs(&self) -> Vec<String> {
self.logs_rx.logs()
@@ -78,7 +79,7 @@ impl Builder for Assembler {
}
/// Start the compilation process in a separate thread
fn start(&mut self) {
fn start(&mut self, args: ()) {
if self.is_running {
return;
}
+1 -1
View File
@@ -46,7 +46,7 @@ fn main() {
let output_path = &args[4];
let mut engine = Assembler::new(PathBuf::from(input_path));
engine.start();
engine.start(());
let result = engine.output().expect("assembler failed.");
if let Err(e) = fs::write(output_path, result) {