Structs being passed indirectly is suprpising and have a high chance not to work as the device and host usually do not share memory.
rustc_target
contains some very low-level details that are
specific to different compilation targets and so forth.
For more information about how rustc works, see the rustc dev guide.