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

Allow using script with a template instead of just expr

Open jeromegn opened this issue 4 years ago • 1 comments

Maybe this is already a feature, but I can't figure out the syntax.

I made a template called sys.rs and put it in the right path, but none of these work:

rust-script myscript -t sys
rust-script -t sys myself

--expr seems required with a --template flag.

jeromegn avatar Nov 23 '20 16:11 jeromegn

Perhaps this is good, to avoid making scripts non-portable?

Perhaps specifying a dependency to a local crate could provide some similar functionality for those who need it, to avoid having something rust-script specific?

fornwall avatar Jul 22 '21 08:07 fornwall