@@ -39,39 +39,46 @@ pub const LUA_MAX_UPVALUES: c_int = 200;
39
39
#[ doc( hidden) ]
40
40
pub const LUA_TRACEBACK_STACK : c_int = 11 ;
41
41
42
+ // Copied from https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/common/alloc.rs
42
43
// The minimum alignment guaranteed by the architecture. This value is used to
43
44
// 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
45
45
#[ cfg( any(
46
46
target_arch = "x86" ,
47
47
target_arch = "arm" ,
48
+ target_arch = "m68k" ,
49
+ target_arch = "csky" ,
48
50
target_arch = "mips" ,
51
+ target_arch = "mips32r6" ,
49
52
target_arch = "powerpc" ,
50
53
target_arch = "powerpc64" ,
51
54
target_arch = "sparc" ,
52
- target_arch = "asmjs" ,
53
55
target_arch = "wasm32" ,
54
56
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
+ ) ,
56
61
all( target_arch = "xtensa" , not( target_os = "espidf" ) ) ,
57
62
) ) ]
58
63
#[ doc( hidden) ]
59
64
pub const SYS_MIN_ALIGN : usize = 8 ;
60
65
#[ cfg( any(
61
66
target_arch = "x86_64" ,
62
67
target_arch = "aarch64" ,
68
+ target_arch = "arm64ec" ,
69
+ target_arch = "loongarch64" ,
63
70
target_arch = "mips64" ,
71
+ target_arch = "mips64r6" ,
64
72
target_arch = "s390x" ,
65
73
target_arch = "sparc64" ,
66
74
target_arch = "riscv64" ,
67
75
target_arch = "wasm64" ,
68
- target_arch = "loongarch64" ,
69
76
) ) ]
70
77
#[ doc( hidden) ]
71
78
pub 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.
73
80
#[ cfg( any(
74
- all( target_arch = "riscv32" , target_os = "espidf" ) ,
81
+ all( target_arch = "riscv32" , any ( target_os = "espidf" , target_os = "zkvm" ) ) ,
75
82
all( target_arch = "xtensa" , target_os = "espidf" ) ,
76
83
) ) ]
77
84
#[ doc( hidden) ]
0 commit comments