It seems that there's no need to pass a pointer to ByteBuffer when going through FFI. The byte arrays can be passed as ByteBuffer directly. The calling runtime will still be responsible for clearing the buffer.
This appears to be a cosmetic change, but for .NET specifically, it allows us to avoid using unsafe context anywhere, and just rely on the marshaling logic to handle structs.
I've tested this on Mac, Windows and Linux.
It seems that there's no need to pass a pointer to ByteBuffer when going through FFI. The byte arrays can be passed as ByteBuffer directly. The calling runtime will still be responsible for clearing the buffer. This appears to be a cosmetic change, but for .NET specifically, it allows us to avoid using
unsafe
context anywhere, and just rely on the marshaling logic to handle structs. I've tested this on Mac, Windows and Linux.