Ask coding questions

← Back to all posts
Rust external crates
AshHeart (5)

How do I add external crates in the rust compiler??

Commentshotnewtop
AshHeart (5)

Ok my bad, rephrasing my question... how do i use external packages like rand in my rust code, when I run the code in repl.it's rust editor and console.

timmy_i_chen (989)

By crates, do you mean packages? O_o

AshHeart (5)

@timmy_i_chen Yes, for example to bring in rng functions you use extern crate rand; right, how to include those packages?

timmy_i_chen (989)

@AshHeart We don't support packages outside of Python, JS, and Ruby right now :( We will be sure to add this in though. You should definitely post (or upvote relevant posts) on our feedback board though! https://repl.it/feedback/

AshHeart (5)

@timmy_i_chen OK, and thanks for letting me know, will be waiting for support for packages in more laguages.