The Module.target() function accepts an optional keyword argument called target_class that can be passed an alternative class to be used instead of craftr.runtime.Target. This could be used as a "plugin hook".
These custom targets could also implement special support for specific backends, for example Ninja. The custom target class would know how to properly implement auto dependencies for the used compiler in Ninja.
This is just a draft on how such a target subclass could look like:
The
Module.target()
function accepts an optional keyword argument calledtarget_class
that can be passed an alternative class to be used instead ofcraftr.runtime.Target
. This could be used as a "plugin hook".Consider:
These custom targets could also implement special support for specific backends, for example Ninja. The custom target class would know how to properly implement auto dependencies for the used compiler in Ninja.
This is just a draft on how such a target subclass could look like: