fornwall / rust-script

Run Rust files and expressions as scripts without any setup or compilation step.
https://rust-script.org
Apache License 2.0
1.2k stars 41 forks source link

ability to compile a script as a library #111

Open joseluis opened 1 year ago

joseluis commented 1 year ago

It would be wonderful if we could add a [lib] section to the script, choose the crate-type and have it appear compiled next to the script.

fornwall commented 1 year ago

@joseluis Thanks for the suggestion, sounds interesting. Thinking about it and experimenting.

joseluis commented 1 year ago

I'm happy to hear that. I'm realizing now that it would make sense then to be able to do a similar thing with the binary, being able to have it appear compiled in the same dir. What do you think?