Module plugin

Module plugin 

Source
Expand description

§Plugin System for mimium

In order to extend mimium’s capability to communicate between host system, mimium has its own FFI system. The FFI is done through some traits in this plugin module in order to decouple dependencies(modules may depends on external crates). There are 3 types of interfaces you need to define depending on what you need.

  1. IO Plugins Sets of instance-free external functions such as print and println. They are mostly for glue functions for host system’s IO. mimium-core is an example of this type of module.
  2. External Unit Generator(UGen) Plugin. If you need to define native Unit Generator, use UGenPlugin interface. In mimium code, you need to call higher-order function that returns instance of the UGen. You need to write small wrapper for this which simply calls object’s constructor (In the future, this wrapper will be automatically implemented through proc-macro). Multiple instances may exist at the same time. mimium-symphonia is a example of this type of module.
  3. System Plugin. If your plugin needs to mutate states of system-wide instance (1 plugin instance per 1 vm), you need to implement SystemPlugin traits. System plugin can have callbacks invoked at the important timings of the system like on_init, before_on_sample & so on. Internal synchronous event scheduler is implemented through this plugins system. mimium-rand is also an example of this type of module.

Structs§

CommonFunction
DynSystemPlugin
A dynamically dispatched plugin wrapped in reference-counted storage.
ExtClsInfo
ExtFunInfo
ExtFunTypeInfo
InstantPlugin
MacroInfo
SysPluginSignature
Metadata for a callback provided by a SystemPlugin.

Traits§

MachineFunction
MacroFunction
Plugin
SystemPlugin
Trait implemented by runtime plugins.
SystemPluginAudioWorker
UGenPlugin
Todo: Make wrapper macro for auto impl Plugin

Functions§

get_builtin_fns_as_plugins
get_ext_closures
get_extfun_types
get_macro_functions

Type Aliases§

ExtClsType
ExtFunType
MacroFunType
SystemPluginFnType
SystemPluginMacroType