Skip to content

Commit

Permalink
Merge pull request #5 from 0xPolygonMiden/greenhat/switch-alloc
Browse files Browse the repository at this point in the history
switch from `wee_alloc` to our own `miden_sdk::BumpAlloc`
  • Loading branch information
bitwalker authored Aug 27, 2024
2 parents 58d5f59 + 08cd79c commit 6e027e6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions account/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler", rev = "{{ comp
{% else %}
miden-sdk = { git = "https://github.com/0xPolygonMiden/compiler" }
{% endif %}
# Use a tiny allocator in place of the default one, if we want
# to make use of types in the `alloc` crate, e.g. String. We
# don't need that now, but its good information to have in hand.
wee_alloc = { version = "0.4.5", default-features = false}

[profile.release]
# optimize the output for size
Expand Down
2 changes: 1 addition & 1 deletion account/template/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2024-03-10"
channel = "nightly-2024-05-07"
components = ["rustfmt", "rust-src"]
targets = ["wasm32-wasi"]
profile = "minimal"
2 changes: 1 addition & 1 deletion account/template/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

// Required for no-std crates
#[panic_handler]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2024-03-10
nightly-2024-05-07

0 comments on commit 6e027e6

Please sign in to comment.