There is also no reason a user should avoid using a library just because it contains unsafe code, because unsafe is such a general block, it simply tells you nothing about whether the developers of a specific libraries are incompetent or not, and the fact that they where capable of getting such a high score on a benchmark, proves they at least understand what they're doing at a very fundamental level, and that's the purpose of a benchmark. There are not always but often trade-offs worth taking between safe and unsafe code, and sometimes an unsafe solution can even be less error prone then a safe one. Rust is a practical language, it's not a language for the purist you should want to write safe code, but you shouldn't have to void writing unsafe code.
ACTIX OPTIMIZATION CODE
If you did a good job, then the safe code will be usable as any other safe code. I don't think you understand what the purpose of unsafe is in Rust: it's to attempt to isolate unsafety, where it's impossible to do something in a provably safe manner or that the trade-offs aren't worth it to you, and the purpose of the unsafe block is making scanning through unsafe code easier, by providing you annotations of where to find this unsafe code. Unsafe isn't something you need to avoid, there's plenty of unsafe code in the standard library, including in Vec itself. We'll do our best to keep these links up to date, but if we fall behind please don't hesitate to shoot us a modmail. This is not an official Rust forum, and cannot fulfill feature requests. Err on the side of giving others the benefit of the doubt.Īvoid re-treading topics that have been long-settled or utterly exhausted. Please create a read-only mirror and link that instead.Ī programming language is rarely worth getting worked up over.īe charitable in intent. As a request comes in, one of them is checked out, populated, and handed off to user code. On startup, 128 request and response objects are pre-allocated in per-thread pools. If criticizing a project on GitHub, you may not link directly to the project's issue tracker. Actix leverages Drop to implement request and response pools. Post titles should include useful context.įor Rust questions, use the stickied Q&A thread.Īrts-and-crafts posts are permitted on weekends.Ĭriticism is encouraged, though it must be constructive, useful and actionable. For content that does not, use a text post to explain its relevance. Posts must reference Rust or relate to things using Rust. We observe the Rust Project Code of Conduct. Strive to treat others with respect, patience, kindness, and empathy. Please read The Rust Community Code of Conduct The Rust Programming LanguageĪ place for all things related to the Rust programming language-an open-source systems language that emphasizes performance, reliability, and productivity.