Is it possible to control the alignment of the Rust structure on a stable compiler?

I want to write Rust RFI for a C structure using an attribute aligned.

At night, you can use #[feature(repr_simd)], as in this matter . The same method without is #[repr(simd)]apparently limited to a maximum alignment of 8 bytes.

There are various RFC issues that are open to both alignment and SIMD, and the compiler points to tracking # 27731 , which seems to be stalled.

RFC # 325 indicates quite clearly that it is not, but it is somewhat old.

Can this be done using a stable compiler in clean (unsafe?) Rust from version 1.22?

+4
source share

Source: https://habr.com/ru/post/1660897/


All Articles