solana-sdk now builds for wasm32-unknown-unknown

This commit is contained in:
Michael Vines
2021-10-12 18:20:55 -07:00
parent da45be366a
commit 13462d63a2
6 changed files with 17 additions and 7 deletions

View File

@ -55,3 +55,6 @@ rustc_version = "0.4"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[lib]
crate-type = ["cdylib", "rlib"]

View File

@ -28,7 +28,7 @@ pub type ProcessInstruction =
pub const SUCCESS: u64 = 0;
/// Start address of the memory region used for program heap.
pub const HEAP_START_ADDRESS: usize = 0x300000000;
pub const HEAP_START_ADDRESS: u64 = 0x300000000;
/// Length of the heap memory region used for program heap.
pub const HEAP_LENGTH: usize = 32 * 1024;
@ -70,7 +70,7 @@ macro_rules! custom_heap_default {
#[cfg(all(not(feature = "custom-heap"), target_arch = "bpf"))]
#[global_allocator]
static A: $crate::entrypoint::BumpAllocator = $crate::entrypoint::BumpAllocator {
start: $crate::entrypoint::HEAP_START_ADDRESS,
start: $crate::entrypoint::HEAP_START_ADDRESS as usize,
len: $crate::entrypoint::HEAP_LENGTH,
};
};