Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.14.3 (unreleased)

### Changes

- Updated for compatibility with miden-vm v0.22.1 (`Arc<Library>` return types, `MastArtifact`/`PackageKind` removal) ([#2742](https://github.com/0xMiden/protocol/pull/2742)).

## 0.14.2 (2026-03-31)

### Changes
Expand Down
141 changes: 121 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/miden-agglayer/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::env;
use std::fmt::Write;
use std::path::Path;
use std::sync::Arc;

use fs_err as fs;
use miden_assembly::diagnostics::{IntoDiagnostic, NamedSource, Result, WrapErr};
Expand Down Expand Up @@ -117,7 +118,7 @@ fn compile_agglayer_lib(
let output_file = target_dir.join("agglayer").with_extension(Library::LIBRARY_EXTENSION);
agglayer_lib.write_to_file(output_file).into_diagnostic()?;

Ok(agglayer_lib)
Ok(Arc::unwrap_or_clone(agglayer_lib))
}

// COMPILE EXECUTABLE MODULES
Expand Down Expand Up @@ -206,7 +207,7 @@ fn compile_account_components(
target_dir.join(&component_name).with_extension(Library::LIBRARY_EXTENSION);
component_library.write_to_file(&component_file_path).into_diagnostic()?;

component_libraries.push((component_name, component_library));
component_libraries.push((component_name, Arc::unwrap_or_clone(component_library)));
}

Ok(component_libraries)
Expand Down
4 changes: 2 additions & 2 deletions crates/miden-protocol/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn compile_tx_kernel(source_dir: &Path, target_dir: &Path, build_dir: &str) -> R

let masb_file_path =
target_dir.join("kernel_library").with_extension(Library::LIBRARY_EXTENSION);
test_lib.write_to_file(masb_file_path).into_diagnostic()?;
(*test_lib).write_to_file(masb_file_path).into_diagnostic()?;
}

Ok(assembler)
Expand Down Expand Up @@ -284,7 +284,7 @@ fn compile_protocol_lib(
let output_file = target_dir.join("protocol").with_extension(Library::LIBRARY_EXTENSION);
protocol_lib.write_to_file(output_file).into_diagnostic()?;

Ok(protocol_lib)
Ok(Arc::unwrap_or_clone(protocol_lib))
}

// HELPER FUNCTIONS
Expand Down
18 changes: 11 additions & 7 deletions crates/miden-protocol/src/account/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl AccountBuilder {

#[cfg(test)]
mod tests {
use std::sync::LazyLock;
use std::sync::{Arc, LazyLock};

use assert_matches::assert_matches;
use miden_assembly::{Assembler, Library};
Expand All @@ -312,14 +312,18 @@ mod tests {
";

static CUSTOM_LIBRARY1: LazyLock<Library> = LazyLock::new(|| {
Assembler::default()
.assemble_library([CUSTOM_CODE1])
.expect("code should be valid")
Arc::unwrap_or_clone(
Assembler::default()
.assemble_library([CUSTOM_CODE1])
.expect("code should be valid"),
)
});
static CUSTOM_LIBRARY2: LazyLock<Library> = LazyLock::new(|| {
Assembler::default()
.assemble_library([CUSTOM_CODE2])
.expect("code should be valid")
Arc::unwrap_or_clone(
Assembler::default()
.assemble_library([CUSTOM_CODE2])
.expect("code should be valid"),
)
});

static CUSTOM_COMPONENT1_SLOT_NAME: LazyLock<StorageSlotName> = LazyLock::new(|| {
Expand Down
Loading
Loading