Wasm32: Rc<dyn Trait> to speed up compilation?

Regardless of which crate I modify, cargo web, in the end seems to need to link together all the crates. As the lines of code has increased, this has become slower and slower.

I'm wondering if it's possible for these crates to not be linked together, and somehow loaded via a 'plugin' like fashion. Imagine we are writing an IDE. In one world, everything is linked together to form a single binary. In another world, we define a plugin 'interface' via Trait, and have lots of plugins implementing these traits, and load these plugins at runtime.

Thus, during development, if I modify crate, we only need to rebuild the corresponding 'plugin' and reload it, rather than relink the entire binary.

Is there a way to do something like this in Rust? Something like a Rc seems to provide enough abstraction.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.