Tests in library

I have src/lib.rs, src/smth.rs and want to run tests in smth.rs(not in lib as cargo test).
Also I want to create dynamic library, so I want to know how on Linux/Windows do it:
I need some commands to create .a and .so ...
How then link this library to another crate and so on, thanks in advance!(I didn't work with dynamic library, curious how to).

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.