midenc-codegen-masm 0.10.0

Miden Assembly backend for the Miden compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use alloc::sync::Arc;

use miden_mast_package::Package;
use miden_utils_sync::LazyLock;

const INTRINSICS_PACKAGE_BYTES: &[u8] =
    include_bytes!(concat!(env!("OUT_DIR"), "/compiler-intrinsics.masp"));

static INTRINSICS: LazyLock<Arc<Package>> = LazyLock::new(|| {
    Package::read_from_bytes_unchecked(INTRINSICS_PACKAGE_BYTES)
        .map(Arc::new)
        .expect("failed to read compiler-intrinsics!")
});

/// Load the compiler-intrinsics package for use in assembly
pub fn load() -> Arc<Package> {
    INTRINSICS.clone()
}