Crate rscript[−][src]
Expand description
Crate to easily script any rust project
Rscript
The main idea is:
- Create a new crate (my-project-api for example)
- Add hooks to this api-crate
- This api-crate should be used by the main-crate and by the scripts
- Trigger Hooks in the main crate
- Receive the hooks on the script side, and react to them with any output
Goals:
- Be as easy as possible to include on already established projects
- Strive for maximum compile time guarantees
Structs
Script | A script abstraction |
ScriptInfo | Script metadata that every script should send to the main_crate when starting up after receiving the greeting message Message::Greeting |
ScriptManager | ScriptManager holds all the scripts found, it can be constructed with ScriptManager::default |
Enums
Message | Message that is sent from the main crate to the script each time it wants to interact with it |
ScriptType | ScriptType: Daemon/OneShot |
Traits
Hook | Trait to mark the hooks that will be triggered in the main crate |