Crate aanyx

source ·


  • Constains allthe traits that the plugin system should support. This is the module containing all the definitions of the structs and trait used by the host system. We refer as Host system meaning the part of the application that is responsible to load, manage and call plugins. The traits makes no distinction between dynamic and static dispatch, so restricting to a carticular case is a job of the developer.
  • A collection of tools and utilities to test plugins before releasing. This is the Package Developement Kit. Abbreviated as PDK. This is just an utility that plugin developer may use to test their plugins before releasing them. It contains some implementations that may not respect the final ones, but they should give many informations about the plugin behavior and the correctness of the code
  • Exports all the requirements to make a plugin compatible with the host. Please see the Limitations section inoerder to understan what isor isnot possible to do and how to solve some problems.
  • A system makes the design more simple and clear leaving all the complex part of extracting the right arguments at the compiler. A Registry is to be intended as a big container from which we can extract data based on their type. A simple example is the HashMap<TypeId, Box<Any>> A System is any function that accepts any number (up to 15 because of implementation details) of arguments supporting the FromRegistry trait.


  • This macro automatically creates all the components that are required by the app to load the plugin and check the compatibility
  • This is a macro that generates the name of the plugin declaration in a module. Using this makes easier to check type compatibility between plugins and host systems, because if the plugin doesn’t support the requested plugin type then no declaration will be found.