One of the things I really miss about langauges like python is that you don't have to clutter your import space in order to use most functionality.
That is not true with rust.
In rust, I frequently find myself writing "prelude.rs" modules to import structs and traits that are necessary in practically every file in my project.
To alieviate this, I have created the prelude crate:
https://github.com/vitiral/prelude
https://crates.io/crates/prelude
It can be used like:
extern crate prelude;
use prelude::*
// You can now use HashMap, etc!
This crate was basically put together because of the number of times I write a line of code and then hit compile and see that it doesn't work because of a forgotten import. It is quite annoying to not have access (by default) to std functions like from_iterator
or write_str
because you forgot to import a trait! It is almost as frustrating to be using a HashMap and realize it isn't defined. This is especially frustrating for newbies, so I see this lib as a possible (and effective) workaround.
I have created a survey here and would love everyone's input on what should and shouldn't go in the crate:
https://www.surveymonkey.com/r/5HHPZQD
I would really love feedback! Thanks!