periwinkle/mist
3
17
Fork
You've already forked mist
1

Add plugin system! #30

Merged
periwinkle merged 40 commits from plugins into master 2024年04月01日 07:37:49 +02:00

This has been a long time coming.

Adds a plugin system based on loading dynamic libraries and calling functions from them each frame. Also, a crate to make development of plugins in rust easy.

Works on Linux and Windows

Core 2.0 docs fail on docsrs because it uses nightly toolchain and one of our transitive deps is broken. Will push a patch version if they push the fix to crates.io soon

Things still left to potentially do:

  • (削除) write an example plugin (?) (削除ここまで)
  • (削除) Investigate nonfatal plugin loading errors (削除ここまで)
This has been a long time coming. Adds a plugin system based on loading dynamic libraries and calling functions from them each frame. Also, a crate to make development of plugins in rust easy. Works on Linux and Windows Core 2.0 docs fail on docsrs because it uses nightly toolchain and one of our transitive deps is broken. Will push a patch version if they push the fix to crates.io soon Things still left to potentially do: * ~~write an example plugin (?)~~ * ~~Investigate nonfatal plugin loading errors~~
includes a macro to generate plugin boilerplate and trait for plugin
implementers. these are enabled with guest feature which can be disabled
for core to use to host the plugins
just grabbing symbols from the libraries not really calling
or verifying anything yet
i would like to make these nonfatal at some point
i would still like these to be even more nonfatal (i.e. plugins that
don't cause panics will still run) but this is pretty okay for now.
this means that MistPlugin no longer requires Send + Sync
and in any case it makes no sense to send the plugin itself
across threads
i don't want plugins to depend on serde and ron for no real
reason just to get the run struct
instead we just report them to the user one by one when the plugins
load, and continue to use plugins that worked.
Author
Owner
Copy link

:)

:)
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
periwinkle/mist!30
Reference in a new issue
periwinkle/mist
No description provided.
Delete branch "plugins"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?