You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PluginInformation represents bootstrap data, that contains name, and few callbacks:
name is a name of plugin which doesn't depend of file name of plugins. need for more stability. this name also used during event publishing from plugin.
init_callback - called when the plugins starts, should returns *mut State
event_callback - called when the plugin receives event in EventState
execute_callback - called every 100 microseconds
I think event loop is too complicated for development and i suggest this:
write plugins with some entry_point, e.g. init_callback from prev example.
start this entry point in separated thread.
all plugins will be share events and some data through api calls, e.g. from here.
This approach gives us more safety because crash in plugin won't crash entire plugins system. And states of plugins will be store in plugins instead of storing them in plugin resolver
The text was updated successfully, but these errors were encountered:
Concept
Asya will interop with plugins through C ABI compatible code.
Currently all plugins works as event loops:
*const PluginInformation plugin_info()
wherePluginInformation
is a struct, defined here and looks like:PluginInformation
represents bootstrap data, that containsname
, and few callbacks:name
is a name of plugin which doesn't depend of file name of plugins. need for more stability. this name also used during event publishing from plugin.init_callback
- called when the plugins starts, should returns*mut State
event_callback
- called when the plugin receives event inEventState
execute_callback
- called every 100 microsecondsI think event loop is too complicated for development and i suggest this:
init_callback
from prev example.This approach gives us more safety because crash in plugin won't crash entire plugins system. And
states
of plugins will be store in plugins instead of storing them in plugin resolverThe text was updated successfully, but these errors were encountered: