hwlocality icon indicating copy to clipboard operation
hwlocality copied to clipboard

Consider exposing component/plugin API

Open HadrienG2 opened this issue 2 years ago • 1 comments

In principle, it is possible to extend hwloc by writing plugins for it. However, the compile-time constant used to evaluate ABI compatibility is a header define, which means I can't check it from Rust, so I'm not sure if exposing this from the Rust side is a good idea. It will probably require at least a little build.rs hackery to get back the define value into Rust.

In any case, here's the docs:

  • High-level: https://hwloc.readthedocs.io/en/v2.9/plugins.html
  • Discovery components: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__disc__components.html
  • Discovery backents: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__disc__backends.html
  • Generic components: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__generic__components.html
  • Core component functions: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__components__core__funcs.html
  • Filtering objects: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__components__filtering.html
  • PCI discovery helpers: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__components__pcidisc.html
  • Finding PCI during other discovery: https://hwloc.readthedocs.io/en/v2.9/group__hwlocality__components__pcifind.html

HadrienG2 avatar Feb 16 '23 16:02 HadrienG2

This API is going to take significant effort to bind, and I cannot think of a good use case for it at the moment. If you would have an interest in it, please speak up and describe your use case a bit here!

HadrienG2 avatar Feb 25 '23 06:02 HadrienG2