As fast as C++, but safer
Rust compiles to machine code and has no garbage collector that pauses the program now and then to free memory. Its speed is therefore on the level of C and C++, and its response times are predictable.
The difference is safety. C and C++ leave memory management to the programmer, and the resulting bugs – buffer overflows, use of freed memory – have been the main source of serious security holes for decades. Rust's compiler catches these at compile time: faulty code does not even build.
Fewer servers, lower costs
A Rust server typically handles the same traffic with a fraction of the memory and CPU time that a system written in a scripting language needs a bigger machine for. For a company that is tangible: a smaller rented server, fewer scaling headaches, a lower monthly bill.
We see it ourselves. Our own systems – the ChatLord chat and this website – run on a modest server, and the server of a complete web system is a single compiled program, with no separate runtime.
Fewer bugs in production
Rust's type system is strict. What other languages only reveal at runtime, in some rare case – a missing value, a forgotten error path, two threads writing the same data at once – Rust's compiler flags before the code ever runs.
That asks for more thought at the start of development and pays back with fewer alerts at night. For a company system that runs for years, the trade is well worth it.
- missing values must be handled, so there are no surprise "null" errors,
- errors must be handled or explicitly passed on,
- data races between threads do not compile.
One language from server to phone
Rust is not just for servers. We write the server side of web systems and native desktop and mobile apps in the same language. If a piece of logic – a price calculation or a permission rule, say – is needed on both server and client, it does not have to be written twice in two languages.
When is Rust not the right choice?
Rust is not the best fit for everything. For a prototype of a few days, a one-off data script or a simple brochure site, another tool is often quicker. And if a company already has a well-working system in another language with no problems, a rewrite rarely pays off.
We say so in the consultation: we choose the technology for the task, not the other way round.
In short
When a system has to run for years, serve many users or run on several platforms, Rust gives it a faster, cheaper-to-run and more reliable foundation. That is why we work in it.