oxidecomputer / oxidecomputer/usdt
Support pointers to non-integer, non-Path types?
@iximeow is already working on this.
Since Dec 5, 2025.
- Dominant language
- Rust
- Stars
- 145
- Forks
- 15
- Avg merge
- 14m
- Merged PRs (30d)
- 6
Description
I tried writing this probe today:
fn nvme_interrupt_completion_single(cq: *const CompQueue) {}
and got told Only pointers to integer types are supported because of my devious *const CompQueue. I assume the motivation here is that because repr(Rust) types have unstable layout and may change, it's really a bad idea to write a probe that depends on anything behind that pointer. But I really just want to distinguish the pointer arguments here, not read through them.
I've made the argument a usize for the time being, which is.. functionally enough. If I correctly understand why we don't support pointers to other types, maybe we could loosen that to allow any type that has #[repr(C)]? Then the error could suggest this, too. In this context it'd be totally fine to make CompQueue also repr(C) in support of debuggability, too, so that would probably be a net improvement!
(preemptively assigning myself mostly because I think the change would be small, but I don't plan on posting a PR quickly. If discussion gets settled and someone wants to Do The Thing, I heartily encourage stealing this from me :) )
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.