6 ms·
Kinda late to the party, but just a heads up: in rust, bounds checks are only available on debug builds. I'm not familiar with the internals of Nanite though, s
by cfcosta 4y ago
Kinda late to the party, but just a heads up: in rust, bounds checks are only available on debug builds. I'm not familiar with the internals of Nanite though, so I can't comment on how safe (or unsafe) it should be to implement.
- steveklabnik 4y agoI’m not sure what you mean here, bounds checks have nothing to do with debug builds, other than that optimizations may remove more of them if they’re determined to never fire, and release builds tend to have higher optimization levels. Semantically they’re always on unless you use the get_unchecked method.
- wmanley 4y ago> in rust, bounds checks are only available on debug builds This is not true - bounds checks are always enforced: https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=78fc70d350419b2966b3bea9060e2aa2 https://play.rust-lang.org/?version=stable&mode=release&edit... Maybe you're confusing it with signed overflow behaviour in Rust or bounds checks in Zig?