-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fud2] Migrate operations into Rhai (#2084)
* [fud2] Make plugins optional Very minor fix: #2078 added plugins, controlled by a `plugins` key in `fud2.toml`. However, it inadvertently made this option required, i.e., fud2 would crash if this option was not present. Now it's optional! So we just silently proceed with no plugins if none are configured. * Fix a doc typo * Start refactoring plugin loading * Start refactoring builder functions * Refactor the rest of the functions * Gather up a `register` function * Use a fresh engine for each plugin?? Maybe this is wasteful, but it simplifies things a lot. * Run one script at a time * Refector script contexts * Refactor runner struct * Further beef up the runner * Further simplify interface * Fix a borrow that lasts too long * Fix a method name Clippy was thrown for a loop because of the `to_*` name. * Move plugin loading to DriverBuilder? Now the top-level thing is in the builder itself... no need for an extra trait? Not sure this is a good idea. * translate a bulk of operations into rhai * use single engine to module resolution caching, enabling imports * switched all plugins to use import system * include plugins in debug build * we can now load scripts embedded in the binary * if a module fails once, don't retry it * sort states and operations in list mode * migrate entirely to plugins * gate migration behind a feature * move sorting to when we run files * rename plugins to scripts internally * refactored to have more things live in the resolver * rename plugins/ to scripts/ --------- Co-authored-by: Adrian Sampson <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,110 additions
and
221 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ mod error; | |
mod exec_scripts; | ||
mod plugin; | ||
mod report; | ||
mod resolver; | ||
|
||
pub use plugin::ScriptRunner; |
Oops, something went wrong.