rust-library

create static or dynamic library for other languages or platforms.

add to your project’s cargo.toml
and then compile with cargo build –lib (if you have bin together with your lib, I had it so so I could test it right away, there may be better ways though) or just cargo build if you have only lib. Your dll will be in target/(debug or release) folder.

The cargo build should just build everything, including a library.
Try using the same compiler options that produce a .so file on Linux and see what happens.

[lib]
name = "mylib"
crate-type = ["dylib"]