16 breaking releases
0.17.0 | Jan 14, 2022 |
---|---|
0.15.0 | Oct 22, 2021 |
0.10.0 | Jul 3, 2021 |
#112 in #hook
267 downloads per month
Used in 2 crates
29KB
394 lines
rscript
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
This crate was extracted from IRust
Taking IRust as an example:
- It has an API crate where hooks are defined irust_api
- It trigger hooks on the main crate irust
- And script examples:
- OneShot: irust_prompt
- Daemon: ipython_mode
- DynamicLibary: vim_mode
Check out the examples for more info.
License: MIT
Dependencies
~0.7–1.5MB
~30K SLoC