-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add note script compilation test;
Remove ImportMetadata (function digest) since we get digests from the linked libraries.
- Loading branch information
Showing
31 changed files
with
3,159 additions
and
829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,12 +64,11 @@ fn inline( | |
|
||
#[cfg(test)] | ||
mod tests { | ||
use miden_core::crypto::hash::RpoDigest; | ||
use midenc_hir::{FunctionType, Ident, InterfaceFunctionIdent, InterfaceIdent, Symbol}; | ||
use midenc_hir_type::Type; | ||
|
||
use super::*; | ||
use crate::{component::StaticModuleIndex, config::ImportMetadata, test_utils::test_context}; | ||
use crate::{component::StaticModuleIndex, test_utils::test_context}; | ||
|
||
#[test] | ||
fn translate_simple() { | ||
|
@@ -182,19 +181,8 @@ mod tests { | |
interface: InterfaceIdent::from_full_ident("miden:add/[email protected]"), | ||
function: Symbol::intern("add"), | ||
}; | ||
let import_metadata = [( | ||
interface_function_ident, | ||
ImportMetadata { | ||
digest: RpoDigest::default(), | ||
}, | ||
)] | ||
.into_iter() | ||
.collect(); | ||
|
||
let config = WasmTranslationConfig { | ||
import_metadata, | ||
..Default::default() | ||
}; | ||
let config = WasmTranslationConfig::default(); | ||
let (mut component_types_builder, parsed_component) = | ||
parse(&config, &wasm, &context.session).unwrap(); | ||
let component_translation = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ use alloc::vec::Vec; | |
|
||
use miden_stdlib_sys::Felt; | ||
|
||
use super::CoreAsset; | ||
|
||
#[link(wasm_import_module = "miden:core-import/[email protected]")] | ||
extern "C" { | ||
#[link_name = "get-inputs"] | ||
|
@@ -39,3 +41,7 @@ pub fn get_inputs() -> Vec<Felt> { | |
} | ||
inputs | ||
} | ||
|
||
pub fn get_assets() -> Vec<CoreAsset> { | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(component | ||
;; Component Imports | ||
(lower (("miden:add-package/[email protected]" #add) (digest 0x0000000000000000000000000000000000000000000000000000000000000000) (type (func (abi wasm) (param u32) (param u32) (result u32)))) (#miden:add-package/[email protected] #add) | ||
(lower (("miden:add-package/[email protected]" #add) (type (func (abi wasm) (param u32) (param u32) (result u32)))) (#miden:add-package/[email protected] #add) | ||
|
||
;; Modules | ||
(module #inc_wasm_component | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.