05/05/21
23/9/1442
The :add
command is pretty useful, since it can be used with local crates, for example:
:add tokio
will add tokio from crates.io
:add --path ./tokio
will add local crate tokio
We can use this for interactive usage:
Create a new project to test: cargo new --lib demo
cd demo; irust
Now in IRust run:
:add --path .
to add current path as dependencyuse demo::*;
Now any public function written in lib.rs
will be immediately usable in IRust after saving the file!
demo: