DanielKeep/cargo-script

Add user-define prelude

DanielKeep opened this issue · 1 comments

Allow the user to write (say) $CARGO_HOME/script-prelude.rs, which is then injected by default into all --expr scripts as:

#[path="$CARGO_HOME/script-prelude.rs"] #[macro_use] mod user_prelude; use user_prelude::*;

Sort-of implemented in 0.2.5 with templates.