I have a struct which must be 16-byte aligned when targeting wasm
.
How can I do this?
So for instance, I want to have this struct on wasm
:
#[cfg(target_arch = "wasm32")] <- not sure about this
#[repr(c, align(16))]
struct Foo {...}
And this on all other architectures:
#[cfg(target_arch = "wasm32")] <- not sure about this
#[repr(c)]
struct Foo {...}
Is this possible to achieve with cfg? If so how?