I'm trying to use BigUints from the num crate in Rust, and I'm using this code to import them:
extern crate num;
use num::bigint::BigUint;
However, it returns the following error when I compile:
main.rs:1:1: 1:18 error: can't find crate for `num`
main.rs:1 extern crate num;
^~~~~~~~~~~~~~~~~
error: aborting due to previous error
I'm not using any compiler flags.
What am I doing wrong?
I'm not using any compiler flags.
If you're using just rustc
, then you'll need to use flags to grab the num crate
$ rustc foo.rs --extern num=/path/to/num.rlib
should do it, I think. Of course, you'll have to get a copy of the num crate: https://crates.io/crates/num links to https://github.com/rust-lang/num .
If you use Cargo, you can just add
num = "*"
To the [dependencies]
section of Cargo.toml
and you'll be good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With