Closed briansmith closed 4 months ago
I don't think it's possible to cast to a function pointer without transmute, here are the docs: https://doc.rust-lang.org/std/primitive.fn.html#casting-to-and-from-integers
Just to reiterate: It is concerning that we only use Weak
on a platform for which we don't run tests in CI.
Yes, right now we have built-only CI jobs for many targets. We probably will need to use VMs for targets like NetBSD (I don't think self-hosted runners will be a practical option for us). Looking into https://github.com/vmactions can be a good starting point. It's probably better to discuss it in a separate issue.
@briansmith Could you please rebase or open a new PR with this change?
Yes, I will revisit this when we have a testing solution for it.
Make the conversion from
NonNull<c_void>
to a function pointer more explicit and document the safety assumptions.