@@ -39,39 +39,46 @@ pub const LUA_MAX_UPVALUES: c_int = 200;
3939#[ doc( hidden) ]
4040pub const LUA_TRACEBACK_STACK : c_int = 11 ;
4141
42+ // Copied from https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/common/alloc.rs
4243// The minimum alignment guaranteed by the architecture. This value is used to
4344// add fast paths for low alignment values.
44- // Copied from https://github.com/rust-lang/rust/blob/master/library/std/src/sys/common/alloc.rs
4545#[ cfg( any(
4646 target_arch = "x86" ,
4747 target_arch = "arm" ,
48+ target_arch = "m68k" ,
49+ target_arch = "csky" ,
4850 target_arch = "mips" ,
51+ target_arch = "mips32r6" ,
4952 target_arch = "powerpc" ,
5053 target_arch = "powerpc64" ,
5154 target_arch = "sparc" ,
52- target_arch = "asmjs" ,
5355 target_arch = "wasm32" ,
5456 target_arch = "hexagon" ,
55- all( target_arch = "riscv32" , not( target_os = "espidf" ) ) ,
57+ all(
58+ target_arch = "riscv32" ,
59+ not( any( target_os = "espidf" , target_os = "zkvm" ) )
60+ ) ,
5661 all( target_arch = "xtensa" , not( target_os = "espidf" ) ) ,
5762) ) ]
5863#[ doc( hidden) ]
5964pub const SYS_MIN_ALIGN : usize = 8 ;
6065#[ cfg( any(
6166 target_arch = "x86_64" ,
6267 target_arch = "aarch64" ,
68+ target_arch = "arm64ec" ,
69+ target_arch = "loongarch64" ,
6370 target_arch = "mips64" ,
71+ target_arch = "mips64r6" ,
6472 target_arch = "s390x" ,
6573 target_arch = "sparc64" ,
6674 target_arch = "riscv64" ,
6775 target_arch = "wasm64" ,
68- target_arch = "loongarch64" ,
6976) ) ]
7077#[ doc( hidden) ]
7178pub const SYS_MIN_ALIGN : usize = 16 ;
72- // The allocator on the esp-idf platform guarentees 4 byte alignment.
79+ // The allocator on the esp-idf and zkvm platforms guarantee 4 byte alignment.
7380#[ cfg( any(
74- all( target_arch = "riscv32" , target_os = "espidf" ) ,
81+ all( target_arch = "riscv32" , any ( target_os = "espidf" , target_os = "zkvm" ) ) ,
7582 all( target_arch = "xtensa" , target_os = "espidf" ) ,
7683) ) ]
7784#[ doc( hidden) ]
0 commit comments