Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

build.rs is a useful escape hatch for if you need to do something more complicated, but the nice thing about cargo is that for the most part the defaults work. Generally build.rs only comes in if you have to deal with C, C++ or some other external ecosystem. A pure rust crate basically never needs to touch it, across multiple platforms and build configurations.


Generally yes, but there are things like lalrpop which are pure rust, I personally fall within the pure rust build.rs user purview...


Well I wouldn't call lalrpop "Pure rust". It's a separate language that gets compiled to rust.

It's within the rust ecosystem though. Perhaps cargo could expose a simpler way to use code generators.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: