-
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.
remove digest-in-function-name encoding and
MidenAbiImport::digest
,
change module and function names for core Wasm module imports for stdlib and tx kernel.
- Loading branch information
Showing
21 changed files
with
165 additions
and
1,933 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
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,7 +3,9 @@ use midenc_hir_type::Type::*; | |
|
||
use crate::miden_abi::{FunctionTypeMap, ModuleFunctionTypeMap}; | ||
|
||
pub(crate) const RPO_FALCON512_VERIFY: &str = "rpo_falcon512_verify"; | ||
pub(crate) const MODULE_ID: &str = "miden:core-import/[email protected]"; | ||
|
||
pub(crate) const RPO_FALCON512_VERIFY: &str = "rpo-falcon512-verify"; | ||
|
||
pub(crate) fn signatures() -> ModuleFunctionTypeMap { | ||
let mut m: ModuleFunctionTypeMap = Default::default(); | ||
|
@@ -12,6 +14,6 @@ pub(crate) fn signatures() -> ModuleFunctionTypeMap { | |
RPO_FALCON512_VERIFY, | ||
FunctionType::new([Felt, Felt, Felt, Felt, Felt, Felt, Felt, Felt], []), | ||
); | ||
m.insert("std::crypto::dsa::rpo_falcon512", funcs); | ||
m.insert(MODULE_ID, funcs); | ||
m | ||
} |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ use crate::miden_abi::{FunctionTypeMap, ModuleFunctionTypeMap}; | |
pub const MODULE_ID: &str = "miden:core-import/[email protected]"; | ||
|
||
pub(crate) const BLAKE3_HASH_1TO1: &str = "blake3-hash-one-to-one"; | ||
pub(crate) const BLAKE3_HASH_2TO1: &str = "hash_2to1"; | ||
pub(crate) const BLAKE3_HASH_2TO1: &str = "blake3-hash-two-to-one"; | ||
|
||
pub(crate) fn signatures() -> ModuleFunctionTypeMap { | ||
let mut m: ModuleFunctionTypeMap = Default::default(); | ||
|
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,8 +3,10 @@ use midenc_hir_type::Type::*; | |
|
||
use crate::miden_abi::{FunctionTypeMap, ModuleFunctionTypeMap}; | ||
|
||
pub(crate) const PIPE_WORDS_TO_MEMORY: &str = "pipe_words_to_memory"; | ||
pub(crate) const PIPE_DOUBLE_WORDS_TO_MEMORY: &str = "pipe_double_words_to_memory"; | ||
pub(crate) const MODULE_ID: &str = "miden:core-import/[email protected]"; | ||
|
||
pub(crate) const PIPE_WORDS_TO_MEMORY: &str = "pipe-words-to-memory"; | ||
pub(crate) const PIPE_DOUBLE_WORDS_TO_MEMORY: &str = "pipe-double-words-to-memory"; | ||
|
||
pub(crate) fn signatures() -> ModuleFunctionTypeMap { | ||
let mut m: ModuleFunctionTypeMap = Default::default(); | ||
|
@@ -40,6 +42,6 @@ pub(crate) fn signatures() -> ModuleFunctionTypeMap { | |
], | ||
), | ||
); | ||
m.insert("std::mem", funcs); | ||
m.insert(MODULE_ID, funcs); | ||
m | ||
} |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ pub const MODULE_ID: &str = "miden:core-import/[email protected]"; | |
|
||
pub const ADD_ASSET: &str = "add-asset"; | ||
pub const REMOVE_ASSET: &str = "remove-asset"; | ||
pub const GET_ID: &str = "get_id"; | ||
pub const GET_ID: &str = "get-id"; | ||
|
||
pub(crate) fn signatures() -> ModuleFunctionTypeMap { | ||
let mut m: ModuleFunctionTypeMap = Default::default(); | ||
|
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,12 +3,14 @@ use midenc_hir_type::Type::*; | |
|
||
use crate::miden_abi::{FunctionTypeMap, ModuleFunctionTypeMap}; | ||
|
||
pub const GET_INPUTS: &str = "get_inputs"; | ||
pub const MODULE_ID: &str = "miden:core-import/[email protected]"; | ||
|
||
pub const GET_INPUTS: &str = "get-inputs"; | ||
|
||
pub(crate) fn signatures() -> ModuleFunctionTypeMap { | ||
let mut m: ModuleFunctionTypeMap = Default::default(); | ||
let mut note: FunctionTypeMap = Default::default(); | ||
note.insert(GET_INPUTS, FunctionType::new([I32], [I32, I32])); | ||
m.insert("miden::note", note); | ||
m.insert(MODULE_ID, note); | ||
m | ||
} |
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 |
---|---|---|
|
@@ -4,17 +4,17 @@ use crate::bindings::tx::{AccountId, CoreAsset, NoteId, NoteType, Tag}; | |
|
||
#[link(wasm_import_module = "miden:core-import/[email protected]")] | ||
extern "C" { | ||
#[link_name = "get_id<0x0000000000000000000000000000000000000000000000000000000000000000>"] | ||
#[link_name = "get-id"] | ||
pub fn extern_account_get_id() -> AccountId; | ||
#[link_name = "add-asset"] | ||
pub fn extern_account_add_asset(_: Felt, _: Felt, _: Felt, _: Felt, ptr: *mut CoreAsset); | ||
#[link_name = "remove-asset"] | ||
pub fn extern_account_remove_asset(_: Felt, _: Felt, _: Felt, _: Felt, ptr: *mut CoreAsset); | ||
} | ||
|
||
#[link(wasm_import_module = "miden::note")] | ||
#[link(wasm_import_module = "miden:core-import/note@1.0.0")] | ||
extern "C" { | ||
#[link_name = "get_inputs<0x0000000000000000000000000000000000000000000000000000000000000000>"] | ||
#[link_name = "get-inputs"] | ||
pub fn extern_note_get_inputs(ptr: *mut Felt) -> usize; | ||
} | ||
|
||
|
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
Oops, something went wrong.