diff options
| author | Erik Kaneda <erik@risczero.com> | 2023-11-15 16:57:45 -0800 |
|---|---|---|
| committer | Erik Kaneda <erik@risczero.com> | 2024-01-22 10:15:11 -0800 |
| commit | 75d7d7091a6c891bb98ff4158a09f4e1f2fb2be1 (patch) | |
| tree | 0f94509aa68e84ad42ce4e8a370a611b0551edf9 /library/std/src/sys/pal/common | |
| parent | 966b94e0a2330255e30b687f165dc4f2e8de140a (diff) | |
| download | rust-75d7d7091a6c891bb98ff4158a09f4e1f2fb2be1.tar.gz rust-75d7d7091a6c891bb98ff4158a09f4e1f2fb2be1.zip | |
zkvm: add partial std support
Co-authored-by: Frank Laub <flaub@risc0.com> Co-authored-by: nils <nils@risc0.com> Co-authored-by: Victor Graf <victor@risczero.com> Co-authored-by: weikengchen <w.k@berkeley.edu>
Diffstat (limited to 'library/std/src/sys/pal/common')
| -rw-r--r-- | library/std/src/sys/pal/common/alloc.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/std/src/sys/pal/common/alloc.rs b/library/std/src/sys/pal/common/alloc.rs index b7357460f39..8cf9ef68047 100644 --- a/library/std/src/sys/pal/common/alloc.rs +++ b/library/std/src/sys/pal/common/alloc.rs @@ -16,7 +16,7 @@ use crate::ptr; target_arch = "sparc", target_arch = "wasm32", target_arch = "hexagon", - all(target_arch = "riscv32", not(target_os = "espidf")), + all(target_arch = "riscv32", not(any(target_os = "espidf", target_os = "zkvm"))), all(target_arch = "xtensa", not(target_os = "espidf")), ))] pub const MIN_ALIGN: usize = 8; @@ -32,11 +32,11 @@ pub const MIN_ALIGN: usize = 8; target_arch = "wasm64", ))] pub const MIN_ALIGN: usize = 16; -// The allocator on the esp-idf platform guarantees 4 byte alignment. -#[cfg(any( - all(target_arch = "riscv32", target_os = "espidf"), +// The allocator on the esp-idf and zkvm platforms guarantee 4 byte alignment. +#[cfg(all(any( + all(target_arch = "riscv32", any(target_os = "espidf", target_os = "zkvm")), all(target_arch = "xtensa", target_os = "espidf"), -))] +)))] pub const MIN_ALIGN: usize = 4; pub unsafe fn realloc_fallback( |
