rust-script icon indicating copy to clipboard operation
rust-script copied to clipboard

Add ability to specify template to use in the script itself

Open fornwall opened this issue 5 years ago • 1 comments

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

fornwall avatar Oct 29 '20 00:10 fornwall

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?

fornwall avatar Jul 22 '21 08:07 fornwall