add tagged union support to the C backend? #28
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
Currently the C backend bails out everywhere it finds a rust-like tagged union:
abi-cafe/src/abis/c/declare.rs
Lines 259 to 267 in 6ba6865
This is fair since C doesn't have any such notion, but, RFC#2195 "really tagged unions" exists precisely to define the layouts of tagged unions when you slap
repr(C)
,repr(u8)
orrepr(C, u8)
on a rust tagged union.This is implemented by cbindgen and used by firefox's webrender bindings.
I am a bit on the fence as to whether it is in scope for abi-cafe to provide this feature. If you did provide it you'd have to do some careful and tedious analysis of the attributes on the tagged union since repr(u8) and repr(C) have substantially different layouts.
The text was updated successfully, but these errors were encountered: