Skip to content

Commit

Permalink
refactor: rename miden-sdk-tx-kernel to miden-tx-kernel-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Jun 26, 2024
1 parent 4b01c5a commit d8ea27a
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 72 deletions.
12 changes: 6 additions & 6 deletions sdk/Cargo.lock

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

2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
resolver = "2"
members = [
"stdlib-sys",
"tx-kernel",
"tx-kernel-sys",
"sdk",
]

Expand Down
2 changes: 1 addition & 1 deletion sdk/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ crate-type = ["rlib"]

[dependencies]
miden-stdlib-sys = { path = "../stdlib-sys" }
miden-sdk-tx-kernel = { path = "../tx-kernel" }
miden-tx-kernel-sys = { path = "../tx-kernel-sys" }
2 changes: 1 addition & 1 deletion sdk/sdk/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![no_std]

pub use miden_sdk_tx_kernel::*;
pub use miden_stdlib_sys::*;
pub use miden_tx_kernel_sys::*;
2 changes: 1 addition & 1 deletion sdk/tx-kernel/Cargo.toml → sdk/tx-kernel-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "miden-sdk-tx-kernel"
name = "miden-tx-kernel-sys"
description = "Miden SDK transaction kernel"
version.workspace = true
rust-version.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
;; Functions
(func (export #entrypoint) (param i32)
(block 0 (param v0 i32)
(call #miden_sdk_tx_kernel::get_inputs v0)
(call #miden_tx_kernel_sys::get_inputs v0)
(br (block 1)))

(block 1
Expand Down Expand Up @@ -635,7 +635,7 @@
(br (block 6 v7)))
)

(func (export #miden_sdk_tx_kernel::get_inputs)
(func (export #miden_tx_kernel_sys::get_inputs)
(param i32)
(block 0 (param v0 i32)
(let (v1 i32) (const.i32 0))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use.miden::note

export.entrypoint
exec."miden_sdk_tx_kernel::get_inputs"
exec."miden_tx_kernel_sys::get_inputs"
end


Expand Down Expand Up @@ -2567,7 +2567,7 @@ export."<wee_alloc::WeeAlloc as core::alloc::global::GlobalAlloc>::alloc"
end


export."miden_sdk_tx_kernel::get_inputs"
export."miden_tx_kernel_sys::get_inputs"
mem_load.0x00000000
push.16
u32wrapping_sub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
(type (;5;) (func (param i32 i32 i32)))
(type (;6;) (func (param i32 i32)))
(type (;7;) (func))
(import "miden::note" "get_inputs<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_note_get_inputs (;0;) (type 0)))
(import "miden::note" "get_inputs<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_note_get_inputs (;0;) (type 0)))
(func $entrypoint (;1;) (type 1) (param i32)
local.get 0
call $miden_sdk_tx_kernel::get_inputs
call $miden_tx_kernel_sys::get_inputs
)
(func $__rust_alloc (;2;) (type 2) (param i32 i32) (result i32)
i32.const 1048576
Expand Down Expand Up @@ -485,7 +485,7 @@
global.set $__stack_pointer
local.get 1
)
(func $miden_sdk_tx_kernel::get_inputs (;8;) (type 1) (param i32)
(func $miden_tx_kernel_sys::get_inputs (;8;) (type 1) (param i32)
(local i32 i32 i32)
global.get $__stack_pointer
i32.const 16
Expand Down Expand Up @@ -519,7 +519,7 @@
unreachable
end
local.get 2
call $miden_sdk_tx_kernel::externs::extern_note_get_inputs
call $miden_tx_kernel_sys::externs::extern_note_get_inputs
drop
local.get 0
i32.const 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
(func (export #get_wallet_magic_number) (result felt)
(block 0
(let (v1 felt) (const.felt 0))
(let (v2 felt) (call #miden_sdk_tx_kernel::get_id))
(let (v2 felt) (call #miden_tx_kernel_sys::get_id))
(let (v3 i64) (const.i64 42))
(let (v4 felt) (cast v3))
(let (v5 felt) (add.unchecked v4 v2))
Expand Down Expand Up @@ -193,7 +193,7 @@
(store v25 v8)
(let (v26 i32) (const.i32 32))
(let (v27 i32) (add.wrapping v5 v26))
(call #miden_sdk_tx_kernel::add_asset v27 v5)
(call #miden_tx_kernel_sys::add_asset v27 v5)
(let (v28 u32) (cast v5))
(let (v29 u32) (add.checked v28 32))
(let (v30 (ptr felt)) (inttoptr v29))
Expand Down Expand Up @@ -313,7 +313,7 @@
(store v7 v6)
(let (v8 i64) (const.i64 0))
(let (v9 felt) (cast v8))
(call #miden_sdk_tx_kernel::get_inputs v6)
(call #miden_tx_kernel_sys::get_inputs v6)
(let (v10 u32) (cast v6))
(let (v11 (ptr i32)) (inttoptr v10))
(let (v12 i32) (load v11))
Expand Down Expand Up @@ -1074,7 +1074,7 @@
(let (v6 i32) (sub.wrapping v4 v5))
(let (v7 (ptr i32)) (global.symbol #__stack_pointer))
(store v7 v6)
(call #miden_sdk_tx_kernel::remove_asset v6 v0)
(call #miden_tx_kernel_sys::remove_asset v6 v0)
(let (v8 u32) (cast v6))
(let (v9 (ptr felt)) (inttoptr v8))
(let (v10 felt) (load v9))
Expand All @@ -1095,7 +1095,7 @@
(param v1 felt)
(param v2 felt)
(param v3 i32)
(let (v5 felt) (call #miden_sdk_tx_kernel::create_note v0 v1 v2 v3))
(let (v5 felt) (call #miden_tx_kernel_sys::create_note v0 v1 v2 v3))
(br (block 1 v5)))

(block 1 (param v4 felt)
Expand Down Expand Up @@ -1866,7 +1866,7 @@
(br (block 12 v78 v80 v100 v91)))
)

(func (export #miden_sdk_tx_kernel::get_id)
(func (export #miden_tx_kernel_sys::get_id)
(result felt)
(block 0
(let (v1 felt) (call (#miden::account #get_id)))
Expand All @@ -1876,7 +1876,7 @@
(ret v0))
)

(func (export #miden_sdk_tx_kernel::get_inputs)
(func (export #miden_tx_kernel_sys::get_inputs)
(param i32)
(block 0 (param v0 i32)
(let (v1 i32) (const.i32 0))
Expand Down Expand Up @@ -1944,7 +1944,7 @@
(unreachable))
)

(func (export #miden_sdk_tx_kernel::add_asset)
(func (export #miden_tx_kernel_sys::add_asset)
(param i32) (param i32)
(block 0 (param v0 i32) (param v1 i32)
(let (v2 i32) (const.i32 0))
Expand Down Expand Up @@ -2027,7 +2027,7 @@
(ret))
)

(func (export #miden_sdk_tx_kernel::remove_asset)
(func (export #miden_tx_kernel_sys::remove_asset)
(param i32) (param i32)
(block 0 (param v0 i32) (param v1 i32)
(let (v2 i32) (const.i32 0))
Expand Down Expand Up @@ -2110,7 +2110,7 @@
(ret))
)

(func (export #miden_sdk_tx_kernel::create_note)
(func (export #miden_tx_kernel_sys::create_note)
(param i32) (param felt) (param felt) (param i32) (result felt)
(block 0
(param v0 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
(import "std::crypto_hashes" "blake3_hash_1to1<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_stdlib_sys::stdlib::crypto::hashes::extern_blake3_hash_1to1 (;19;) (type 8)))
(import "std::crypto_hashes" "blake3_hash_2to1<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_stdlib_sys::stdlib::crypto::hashes::extern_blake3_hash_2to1 (;20;) (type 9)))
(import "miden:stdlib/std_crypto_dsa" "rpo_falcon512_verify<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_stdlib_sys::stdlib::crypto::dsa::extern_rpo_falcon512_verify (;21;) (type 10)))
(import "miden::account" "get_id<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_account_get_id (;22;) (type 11)))
(import "miden::note" "get_inputs<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_note_get_inputs (;23;) (type 12)))
(import "miden::account" "add_asset<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_account_add_asset (;24;) (type 13)))
(import "miden::account" "remove_asset<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_account_remove_asset (;25;) (type 13)))
(import "miden::tx" "create_note<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_sdk_tx_kernel::externs::extern_tx_create_note (;26;) (type 14)))
(import "miden::account" "get_id<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_account_get_id (;22;) (type 11)))
(import "miden::note" "get_inputs<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_note_get_inputs (;23;) (type 12)))
(import "miden::account" "add_asset<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_account_add_asset (;24;) (type 13)))
(import "miden::account" "remove_asset<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_account_remove_asset (;25;) (type 13)))
(import "miden::tx" "create_note<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_tx_kernel_sys::externs::extern_tx_create_note (;26;) (type 14)))
(import "miden:stdlib/std_mem" "pipe_words_to_memory<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_stdlib_sys::stdlib::mem::extern_pipe_words_to_memory (;27;) (type 15)))
(import "miden:stdlib/std_mem" "pipe_double_words_to_memory<0x0000000000000000000000000000000000000000000000000000000000000000>" (func $miden_stdlib_sys::stdlib::mem::extern_pipe_double_words_to_memory (;28;) (type 16)))
(func $<<alloc::vec::into_iter::IntoIter<T,A> as core::ops::drop::Drop>::drop::DropGuard<T,A> as core::ops::drop::Drop>::drop (;29;) (type 17) (param i32)
Expand Down Expand Up @@ -143,7 +143,7 @@
)
(func $get_wallet_magic_number (;34;) (type 11) (result f64)
(local f64)
call $miden_sdk_tx_kernel::get_id
call $miden_tx_kernel_sys::get_id
local.set 0
i64.const 42
call $miden_stdlib_sys::intrinsics::felt::extern_from_u64_unchecked
Expand Down Expand Up @@ -183,7 +183,7 @@
i32.const 32
i32.add
local.get 0
call $miden_sdk_tx_kernel::add_asset
call $miden_tx_kernel_sys::add_asset
local.get 0
f64.load offset=32
local.set 1
Expand Down Expand Up @@ -293,7 +293,7 @@
call $miden_stdlib_sys::intrinsics::felt::extern_from_u64_unchecked
local.set 1
local.get 0
call $miden_sdk_tx_kernel::get_inputs
call $miden_tx_kernel_sys::get_inputs
local.get 0
i32.load
local.set 2
Expand Down Expand Up @@ -830,7 +830,7 @@
global.set $__stack_pointer
local.get 1
local.get 0
call $miden_sdk_tx_kernel::remove_asset
call $miden_tx_kernel_sys::remove_asset
local.get 1
f64.load
local.set 2
Expand All @@ -845,7 +845,7 @@
local.get 1
local.get 2
local.get 3
call $miden_sdk_tx_kernel::create_note
call $miden_tx_kernel_sys::create_note
)
(func $__rust_alloc (;45;) (type 24) (param i32 i32) (result i32)
i32.const 1048652
Expand Down Expand Up @@ -1412,10 +1412,10 @@
i32.store
end
)
(func $miden_sdk_tx_kernel::get_id (;52;) (type 11) (result f64)
call $miden_sdk_tx_kernel::externs::extern_account_get_id
(func $miden_tx_kernel_sys::get_id (;52;) (type 11) (result f64)
call $miden_tx_kernel_sys::externs::extern_account_get_id
)
(func $miden_sdk_tx_kernel::get_inputs (;53;) (type 17) (param i32)
(func $miden_tx_kernel_sys::get_inputs (;53;) (type 17) (param i32)
(local i32 i32 i32)
global.get $__stack_pointer
i32.const 16
Expand Down Expand Up @@ -1449,7 +1449,7 @@
unreachable
end
local.get 2
call $miden_sdk_tx_kernel::externs::extern_note_get_inputs
call $miden_tx_kernel_sys::externs::extern_note_get_inputs
drop
local.get 0
i32.const 0
Expand All @@ -1469,7 +1469,7 @@
call $alloc::raw_vec::capacity_overflow
unreachable
)
(func $miden_sdk_tx_kernel::add_asset (;54;) (type 20) (param i32 i32)
(func $miden_tx_kernel_sys::add_asset (;54;) (type 20) (param i32 i32)
(local i32)
global.get $__stack_pointer
i32.const 32
Expand All @@ -1485,7 +1485,7 @@
local.get 1
f64.load offset=24
local.get 2
call $miden_sdk_tx_kernel::externs::extern_account_add_asset
call $miden_tx_kernel_sys::externs::extern_account_add_asset
local.get 0
i32.const 24
i32.add
Expand Down Expand Up @@ -1519,7 +1519,7 @@
i32.add
global.set $__stack_pointer
)
(func $miden_sdk_tx_kernel::remove_asset (;55;) (type 20) (param i32 i32)
(func $miden_tx_kernel_sys::remove_asset (;55;) (type 20) (param i32 i32)
(local i32)
global.get $__stack_pointer
i32.const 32
Expand All @@ -1535,7 +1535,7 @@
local.get 1
f64.load offset=24
local.get 2
call $miden_sdk_tx_kernel::externs::extern_account_remove_asset
call $miden_tx_kernel_sys::externs::extern_account_remove_asset
local.get 0
i32.const 24
i32.add
Expand Down Expand Up @@ -1569,7 +1569,7 @@
i32.add
global.set $__stack_pointer
)
(func $miden_sdk_tx_kernel::create_note (;56;) (type 23) (param i32 f64 f64 i32) (result f64)
(func $miden_tx_kernel_sys::create_note (;56;) (type 23) (param i32 f64 f64 i32) (result f64)
local.get 0
f64.load
local.get 0
Expand All @@ -1588,7 +1588,7 @@
f64.load offset=16
local.get 3
f64.load offset=24
call $miden_sdk_tx_kernel::externs::extern_tx_create_note
call $miden_tx_kernel_sys::externs::extern_tx_create_note
)
(func $alloc::vec::Vec<T>::with_capacity (;57;) (type 20) (param i32 i32)
(local i32 i32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(let (v4 i32) (sub.wrapping v2 v3))
(let (v5 (ptr i32)) (global.symbol #__stack_pointer))
(store v5 v4)
(call #miden_sdk_tx_kernel::add_asset v4 v0)
(call #miden_tx_kernel_sys::add_asset v4 v0)
(let (v6 i32) (const.i32 32))
(let (v7 i32) (add.wrapping v4 v6))
(let (v8 (ptr i32)) (global.symbol #__stack_pointer))
Expand All @@ -43,8 +43,8 @@
(let (v7 i32) (sub.wrapping v5 v6))
(let (v8 (ptr i32)) (global.symbol #__stack_pointer))
(store v8 v7)
(call #miden_sdk_tx_kernel::remove_asset v7 v0)
(let (v9 felt) (call #miden_sdk_tx_kernel::create_note v7 v1 v2 v3))
(call #miden_tx_kernel_sys::remove_asset v7 v0)
(let (v9 felt) (call #miden_tx_kernel_sys::create_note v7 v1 v2 v3))
(let (v10 i32) (const.i32 32))
(let (v11 i32) (add.wrapping v7 v10))
(let (v12 (ptr i32)) (global.symbol #__stack_pointer))
Expand All @@ -55,7 +55,7 @@
(ret))
)

(func (export #miden_sdk_tx_kernel::add_asset)
(func (export #miden_tx_kernel_sys::add_asset)
(param i32) (param i32)
(block 0 (param v0 i32) (param v1 i32)
(let (v2 i32) (const.i32 0))
Expand Down Expand Up @@ -138,7 +138,7 @@
(ret))
)

(func (export #miden_sdk_tx_kernel::remove_asset)
(func (export #miden_tx_kernel_sys::remove_asset)
(param i32) (param i32)
(block 0 (param v0 i32) (param v1 i32)
(let (v2 i32) (const.i32 0))
Expand Down Expand Up @@ -221,7 +221,7 @@
(ret))
)

(func (export #miden_sdk_tx_kernel::create_note)
(func (export #miden_tx_kernel_sys::create_note)
(param i32) (param felt) (param felt) (param i32) (result felt)
(block 0
(param v0 i32)
Expand Down
Loading

0 comments on commit d8ea27a

Please sign in to comment.