I am new to Rust (like 2 days old). With cargo, I created a test library( cargo new utils --lib). I am able to build it and have got the outupt utils.rlib by running 'cargo build' at the utils directory. I want to create a test binary (say caller.exe) that uses this library. So, I copied the utils.rlib file to a directory lib (as a sibling to the caller's src directory.
I am able to build the caller.exe with the rustc at the 'caller' directory as given below,
rustc src\main.rs --extern utils=lib\libutils.rlib -o caller.exe
Instead of using rustc explicitly, I want to use 'cargo build' to generate caller.exe. Would you please tell me what to put in the cargo.toml file? (specifically, I want to use the already generted utils.rlib file, instead of building it from its source code again.)
I searched the rust documentation, but failed to find the solution.