That being said, I am not sure it is really memory-safe as per this patch. Rustc doesn't complain but I am pretty sure the borrow we are extending has to be pinned to ensure the original context's memory doesn't get re-positioned. Not 100% sure but pretty sure. Can't hurt for safety. Just requires me put another couple hours at it.
This is... certainly risky, but it does work.
That being said, I am not sure it is really memory-safe as per this patch. Rustc doesn't complain but I am pretty sure the borrow we are extending has to be pinned to ensure the original context's memory doesn't get re-positioned. Not 100% sure but pretty sure. Can't hurt for safety. Just requires me put another couple hours at it.