
Architecture
Library or Binary Splitting a Rust Crate for Testability
Put logic in a library crate and keep main.rs thin, so tests can call functions, integration tests see the public API and other binaries can reuse the code.
3 min read
Tag
1 post

Put logic in a library crate and keep main.rs thin, so tests can call functions, integration tests see the public API and other binaries can reuse the code.