Skip to content

Commit

Permalink
refactor!: rename miden-sdk crate to miden #338
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Oct 15, 2024
1 parent 6a59e3d commit 9f65928
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 68 deletions.
18 changes: 9 additions & 9 deletions 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/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "miden-sdk"
name = "miden"
description = "Miden SDK"
version.workspace = true
rust-version.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/src/compiler_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ authors = []
[dependencies]
miden-sdk-alloc = {{ path = "{sdk_alloc_path}" }}
miden-sdk = {{ path = "{sdk_path}" }}
miden = {{ path = "{sdk_path}" }}
[lib]
crate-type = ["cdylib"]
Expand Down Expand Up @@ -873,8 +873,8 @@ fn my_panic(_info: &core::panic::PanicInfo) -> ! {{
#[global_allocator]
static ALLOC: miden_sdk_alloc::BumpAlloc = miden_sdk_alloc::BumpAlloc::new();
extern crate miden_sdk;
use miden_sdk::*;
extern crate miden;
use miden::*;
extern crate alloc;
use alloc::vec::Vec;
Expand Down
10 changes: 5 additions & 5 deletions tests/rust-apps-wasm/rust-sdk/account-test/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 tests/rust-apps-wasm/rust-sdk/account-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
crate-type = ["cdylib", "rlib"]

[dependencies]
miden-sdk = { path = "../../../../sdk/sdk" }
miden = { path = "../../../../sdk/sdk" }
wee_alloc = { version = "0.4.5", default-features = false }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion tests/rust-apps-wasm/rust-sdk/account-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate alloc;

use miden_sdk::*;
use miden::*;

#[global_allocator]
static ALLOC: BumpAlloc = BumpAlloc::new();
Expand Down
10 changes: 5 additions & 5 deletions tests/rust-apps-wasm/rust-sdk/basic-wallet/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 tests/rust-apps-wasm/rust-sdk/basic-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ crate-type = ["cdylib"]
[dependencies]
# Miden SDK consists of a stdlib (intrinsic functions for VM ops, stdlib functions and types)
# and transaction kernel API for the Miden rollup
miden-sdk = { path = "../../../../sdk/sdk" }
miden = { path = "../../../../sdk/sdk" }
wit-bindgen-rt = "0.28"


Expand Down
66 changes: 33 additions & 33 deletions tests/rust-apps-wasm/rust-sdk/basic-wallet/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ pub mod exports {
arg3: f32,
) {
#[cfg(target_arch = "wasm32")] _rt::run_ctors_once();
T::receive_asset(miden_sdk::CoreAsset {
inner: miden_sdk::Word {
T::receive_asset(miden::CoreAsset {
inner: miden::Word {
inner: (
miden_sdk::Felt { inner: arg0 },
miden_sdk::Felt { inner: arg1 },
miden_sdk::Felt { inner: arg2 },
miden_sdk::Felt { inner: arg3 },
miden::Felt { inner: arg0 },
miden::Felt { inner: arg1 },
miden::Felt { inner: arg2 },
miden::Felt { inner: arg3 },
),
},
});
Expand All @@ -91,29 +91,29 @@ pub mod exports {
) {
#[cfg(target_arch = "wasm32")] _rt::run_ctors_once();
T::send_asset(
miden_sdk::CoreAsset {
inner: miden_sdk::Word {
miden::CoreAsset {
inner: miden::Word {
inner: (
miden_sdk::Felt { inner: arg0 },
miden_sdk::Felt { inner: arg1 },
miden_sdk::Felt { inner: arg2 },
miden_sdk::Felt { inner: arg3 },
miden::Felt { inner: arg0 },
miden::Felt { inner: arg1 },
miden::Felt { inner: arg2 },
miden::Felt { inner: arg3 },
),
},
},
miden_sdk::Tag {
inner: miden_sdk::Felt { inner: arg4 },
miden::Tag {
inner: miden::Felt { inner: arg4 },
},
miden_sdk::NoteType {
inner: miden_sdk::Felt { inner: arg5 },
miden::NoteType {
inner: miden::Felt { inner: arg5 },
},
miden_sdk::Recipient {
inner: miden_sdk::Word {
miden::Recipient {
inner: miden::Word {
inner: (
miden_sdk::Felt { inner: arg6 },
miden_sdk::Felt { inner: arg7 },
miden_sdk::Felt { inner: arg8 },
miden_sdk::Felt { inner: arg9 },
miden::Felt { inner: arg6 },
miden::Felt { inner: arg7 },
miden::Felt { inner: arg8 },
miden::Felt { inner: arg9 },
),
},
},
Expand All @@ -127,10 +127,10 @@ pub mod exports {
) -> f32 {
#[cfg(target_arch = "wasm32")] _rt::run_ctors_once();
let result0 = T::test_felt_intrinsics(
miden_sdk::Felt { inner: arg0 },
miden_sdk::Felt { inner: arg1 },
miden::Felt { inner: arg0 },
miden::Felt { inner: arg1 },
);
let miden_sdk::Felt { inner: inner1 } = result0;
let miden::Felt { inner: inner1 } = result0;
_rt::as_f32(inner1)
}
#[doc(hidden)]
Expand Down Expand Up @@ -163,17 +163,17 @@ pub mod exports {
_rt::cabi_dealloc(base2, len2 * 1, 1);
}
pub trait Guest {
fn receive_asset(core_asset: miden_sdk::CoreAsset);
fn receive_asset(core_asset: miden::CoreAsset);
fn send_asset(
core_asset: miden_sdk::CoreAsset,
tag: miden_sdk::Tag,
note_type: miden_sdk::NoteType,
recipient: miden_sdk::Recipient,
core_asset: miden::CoreAsset,
tag: miden::Tag,
note_type: miden::NoteType,
recipient: miden::Recipient,
);
fn test_felt_intrinsics(
a: miden_sdk::Felt,
b: miden_sdk::Felt,
) -> miden_sdk::Felt;
a: miden::Felt,
b: miden::Felt,
) -> miden::Felt;
fn test_stdlib(input: _rt::Vec<u8>) -> _rt::Vec<u8>;
}
#[doc(hidden)]
Expand Down
4 changes: 2 additions & 2 deletions tests/rust-apps-wasm/rust-sdk/basic-wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloc::vec::Vec;

// Global allocator to use heap memory in no-std environment
#[global_allocator]
static ALLOC: miden_sdk::BumpAlloc = miden_sdk::BumpAlloc::new();
static ALLOC: miden::BumpAlloc = miden::BumpAlloc::new();

// Required for no-std crates
#[panic_handler]
Expand All @@ -22,7 +22,7 @@ bindings::export!(MyAccount with_types_in bindings);
mod bindings;

use bindings::exports::miden::basic_wallet::basic_wallet::Guest;
use miden_sdk::{
use miden::{
add_asset, blake3_hash_1to1, create_note, remove_asset, CoreAsset, Felt, NoteType, Recipient,
Tag,
};
Expand Down
14 changes: 7 additions & 7 deletions tools/cargo-miden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ where

for package in packages.iter_mut() {
package.metadata.section.bindings.with = [
("miden:base/[email protected]/felt", "miden_sdk::Felt"),
("miden:base/[email protected]/word", "miden_sdk::Word"),
("miden:base/[email protected]/core-asset", "miden_sdk::CoreAsset"),
("miden:base/[email protected]/account-id", "miden_sdk::AccountId"),
("miden:base/[email protected]/tag", "miden_sdk::Tag"),
("miden:base/[email protected]/note-type", "miden_sdk::NoteType"),
("miden:base/[email protected]/recipient", "miden_sdk::Recipient"),
("miden:base/[email protected]/felt", "miden::Felt"),
("miden:base/[email protected]/word", "miden::Word"),
("miden:base/[email protected]/core-asset", "miden::CoreAsset"),
("miden:base/[email protected]/account-id", "miden::AccountId"),
("miden:base/[email protected]/tag", "miden::Tag"),
("miden:base/[email protected]/note-type", "miden::NoteType"),
("miden:base/[email protected]/recipient", "miden::Recipient"),
]
.into_iter()
.map(|(k, v)| (k.to_string(), v.to_string()))
Expand Down

0 comments on commit 9f65928

Please sign in to comment.