External crates in rust playgound


#1

Is it possible to use external crates in https://play.rust-lang.org/ ?
It not, is it part of the feature list ?
Thanks!!


#2

Edit: oops, don’t do this in general: #![feature(rustc_private)]

list of available crates


#3

Thanks so much!
I was trying to use rand and looks like it is temporarily removed from the list.

Here is the link if anyone else faces the same issue…

Cheers!


#4

Don’t use #![feature(rustc_private); that gives you the compiler’s private crates, and they may not match the external versions at all.

The top 100 crates by download count can generally be used. If you type extern crate you’ll get a list.


#5

Yeah, sorry. I was trying to use rand, too, and found that it was missing.