You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[repr(C)]#[cfg(target_pointer_width = "64")]pubstructValueOpaque([usize;7]);#[repr(C)]#[cfg(target_pointer_width = "32")]#[repr(align(8))]pubstructValueOpaque([usize;9]);/// Asserts that ValueOpaque is as large as Value and has the same alignment, to make transmute safe.const _:[(); std::mem::size_of::<ValueOpaque>()] = [(); std::mem::size_of::<Value>()];const _:[(); std::mem::align_of::<ValueOpaque>()] = [(); std::mem::align_of::<Value>()];
cbindgen is configured to emit based on the target_pointer_width, which works for many types we emit. But somehow the #[repr(align(8))] breaks that. If I remove it (and comment out the assertion), then the generated header file is correct.
The text was updated successfully, but these errors were encountered:
Cross-compiling with cmake on 64-bit host to 32-bit target and enabling the interpreter breaks the build complaining that
ValueOpaque
is missing.The generated
slint_interpreter_internal.h
is indeed missing the 32-bit variant:In
ffi.rs
this is how it is declared:cbindgen is configured to emit based on the
target_pointer_width
, which works for many types we emit. But somehow the#[repr(align(8))]
breaks that. If I remove it (and comment out the assertion), then the generated header file is correct.The text was updated successfully, but these errors were encountered: