3 ms·
The tl;dr is that part of why Actix is so fast is that it takes an aggressive approach to the use of unsafe code blocks. This is not inherently a bad thing (Rus
by geofft 7y ago
The tl;dr is that part of why Actix is so fast is that it takes an aggressive approach to the use of unsafe code blocks. This is not inherently a bad thing (Rust's own standard library is full of unsafe) as long as the APIs you expose on top are safe. Actix has drawn criticism multiple times over years for excessive use of unsafe; many times these criticisms have included findings that safe APIs can be misused. The primary author of Actix sees it more as project of intellectual curiosity - which is certainly a fine way to run a project, it's just a little at odds with the perception you (correctly) picked up of Actix being a flagship Rust framework and recommended for production use. He doesn't see unsafe code as something to be cautious about and hasn't prioritized removing unnecessary unsafe code, which puts him a bit at odds with the Rust community and also gave Actix a bit of a reputation of "the framework that's fast because it cheats" (which isn't totally fair but isn't totally unfair either).
This weekend, someone found an unsound use of unsafe code, reported a bug, and eventually a patch was supplied that switches out some optimized Actix types for somewhat less optimized standard library types. The author dismissed the patch as "boring," the internet got mad, and the author got mad.