Skip to content

Commit

Permalink
fixup: include stdlib in kernel case
Browse files Browse the repository at this point in the history
tested with:
cargo run --features executable -- bundle ~/miden/miden-base/miden-lib/asm/kernels/transaction/lib --kernel ~/miden/miden-base/miden-lib/asm/kernels/transaction/api.masm
  • Loading branch information
paracetamolo committed Dec 12, 2024
1 parent 7ef6b94 commit b859898
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion miden/src/cli/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use assembly::{
Assembler, KernelLibrary, Library, LibraryNamespace,
};
use clap::Parser;
use stdlib::StdLibrary;

#[derive(Debug, Clone, Parser)]
#[clap(
Expand Down Expand Up @@ -39,7 +40,7 @@ impl BundleCmd {
println!("Build library");
println!("============================================================");

let assembler = Assembler::default().with_debug_mode(self.debug);
let mut assembler = Assembler::default().with_debug_mode(self.debug);

// write the masl output
let output_file = match &self.output {
Expand All @@ -55,6 +56,7 @@ impl BundleCmd {
match &self.kernel {
Some(kernel) => {
assert!(kernel.is_file(), "kernel must be a file");
let () = assembler.add_library(StdLibrary::default())?;
let library = KernelLibrary::from_dir(kernel, Some(&self.dir), assembler)?;
library.write_to_file(output_file).into_diagnostic()?;
println!(
Expand Down

0 comments on commit b859898

Please sign in to comment.