Q1 is i possible/ would there be demand for a feature to search the crates by the traits they implement,
e.g. we can search for the keyword ‘collections’ , but we could be more specific (“find me all the crates that contain impl’s of trait Index”)’.
Just as the type/trait graph might be a useful way of navigating Rust source, it might be a useful way of searching crates too.
I see there is already ‘keyword’ based search; I suppose we could just extract trait names from impl…for…’ and automatically generate keywords for those, but separating them off in the UI to actually browse separately without polluting the keywords themselves might be nice
Q2 Would it also be an idea to filter by safety,
i.e. any crate that contains no unsafe blocks would be considered ‘especially safe’, whilst crates which use unsafe blocks internally (even if presenting a safe interface) are only safe if they’ve been through empirical testing;
this leads me to ask if this is already handled; the idea of unsafe is “if it crashes, you know where to look” …but if thats in library code what happens?
Does that mean a project really needs to be able to specify on bringing a crate in ‘expect this is extra safe, no unsafe blocks here’.
we assume the standard library’s use of unsafe will have been through more testing, but is that really the case for anything else thrown up on crates.io.
I would personally also like an option for crate wide unsafety, turn the borrow checker into a warning… but the reverse, ‘really safe crates’ seems like they would have more utility for the rust ethos. If you could be more specific in both directions that might be nice.