More aggressive dead code elimination

⚓ Rust    📅 2025-10-28    👤 surdeus    👁️ 2      

surdeus

Hello, I have some amount of assets which I load in one place an use in the other. I would like to have a conditional compilation where I use them, but I don't want to mirror it for the code that loads the assets. Is it possible to tell the compiler to optimize out even the loading of those assets? Each asset can panic for example, they are stored in a struct, it is not getting optimized out right now. So yes, in a sense it changes the behavior of the program.

1 post - 1 participant

Read full topic

🏷️ Rust_feed