So far, the best example I've seen is from bindgen:
But I was hoping for something simpler and that didn't require using bindgen. I only have one or two of these. I could of course do everything bindgen's doing, but I'd like to fully understand the tradeoffs involved.
If I am correct, maybe only write a [WORD; 1] for structs and only use its reference or raw pointer other than creating an instance of itself? OS-oriented adaptions like winapi somehow do this in practice.