Rust workspace versus single crate for plugins
WHAT IT TESTS: structuring a modular Rust system. OUTLINE: a workspace gives incremental compilation, enforced API boundaries via a shared api crate, and per-plugin deps; a single crate is simpler but recompiles wholesale and blurs boundaries.
WHAT IT TESTS: whether you weigh build performance and boundaries against simplicity. ANSWER OUTLINE: the crate is Rust's compilation and privacy unit, so a workspace of plugin crates around a plugin-api crate recompiles only changed crates, forces plugins to depend on a versioned public API, and lets each plugin manage its own dependencies and features. A single crate with module plugins is simpler to navigate and share internals but recompiles as one unit and lets plugins reach into each other freely.
Read the original → interview
- #rust
- #workspace
- #crates
- #plugin-architecture
- #compilation
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.