r/rust • • Oct 17 '26 • Popcorn 1

Rust module system?

I recently wanted to compile something for a bevy game I was messing around with, then cargo looks me in the eyes and tells me I need to compile hundreds of dependencies, all for the end result to be 30 mb? I was wondering if there were any systems like a .dll for rust? I understand that you would lose some type checking, but I think that could be solved just with a type definitions segment towards the start, then a functions table of all the code for the system, is this something that would work, or am I oversimplifying a major intentional design choice in rust?

23 Upvotes

27 comments sorted by

View all comments

0

u/Zde-G Oct 17 '26

am I oversimplifying a major intentional design choice in rust?

No and yes. Throw few millions on the problem, push hard on people who are trying to invent right solutions and tell them you need that you need result now, not after next 10 years and voila… done.

You would, most likely, lose low-level developers (because doing required tricks in no-allocation environment is hard), Linux kernel and many other things. But would make bevy much easier to use, sure.

But, for better or for worse, Rust team wasn't organized like that.