4 ms·
I'm not very familiar with Rust at all. How does this work? Monomorphization? Does the rust compiler do wvole-program analysis to create each possible an insta
by aatd86 4y ago
I'm not very familiar with Rust at all.
How does this work? Monomorphization? Does the rust compiler do wvole-program analysis to create each possible an instantiation following the types that implement a given trait?
- Gigachad 4y agoThe compiler does analyse the entire codebase and creates a a copy of the function for every type you use the generic with. This is why Rust compiles libraries with your binary rather than using precompiled ones like you would in C.