<div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hi,<br>I've been really excited to use this API for accessing Rust libraries, but ran into a snag.<br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Most Rust types have undefined layout, with the only properties known being size and alignment via const functions that I can export as symbols for the Java side to know ahead of time. From my understanding of the AMD64 ABI, you need to know the exact struct definition because it can sometimes pass things in registers rather than the stack, so how would I go about passing types by value (at least semantically)?</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">The best I've come up with is passing in/out pointers and memcpying those, but is this the best way? What are the JIT implications of this, if any?</div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Thanks for helping!<br></div>