rust-script
rust-script copied to clipboard
Add ability to specify template to use in the script itself
It would be neat to specify which template needs to be used in the code itself (similar to how you specify dependencies). That way you don’t have to remember what flags to use every time!
Idea from https://www.reddit.com/r/rust/comments/jjnyv1/rustscript_run_rust_files_and_expressions_as/gafeock/?utm_source=reddit&utm_medium=web2x&context=3
Note that templates currently only works for expressions. But perhaps we shouldn't introduce support for templates in scripts as they make things non-portable, and specifying a path to a local crate may be enough for users needing similar functionality?