How to get a NUMA node of the current thread?

⚓ Rust    📅 2026-01-28    👤 surdeus    👁️ 1      

surdeus

I want to get a NUMA node of the current thread on Linux. C language provides libraries like libnuma for this. Linux provides a getcpu syscall. But what is about Rust?

I spent an hour searching and reading but could not find anything. getcpu is not provided by any popular library in Rust (I found only two libraries that contain this syscall, but this syscall is private in they). I also found only one binding to libnuma, and it was patched 8 years ago last time.

I don't want to reinvent the wheel, do you know how I can achieve my goal with existing solutions?

2 posts - 2 participants

Read full topic

🏷️ Rust_feed