CommunityNews

CommunityNews

Is Rust Used Safely by Software Developers?

Is Rust Used Safely by Software Developers?.
Rust, an emerging programming language with explosive growth, provides a
robust type system that enables programmers to write memory-safe and data-race
free code. To allow access to a machine’s hardware and to support low-level
performance optimizations, a second language, Unsafe Rust, is embedded in Rust.
It contains support for operations that are difficult to statically check, such
as C-style pointers for access to arbitrary memory locations and mutable global
variables. When a program uses these features, the compiler is unable to
statically guarantee the safety properties Rust promotes. In this work, we
perform a large-scale empirical study to explore how software developers are
using Unsafe Rust in real-world Rust libraries and applications. Our results
indicate that software engineers use the keyword unsafe in less than 30% of
Rust libraries, but more than half cannot be entirely statically checked by the
Rust compiler because of Unsafe Rust hidden somewhere in a library’s call
chain. We conclude that although the use of the keyword unsafe is limited, the
propagation of unsafeness offers a challenge to the claim of Rust as a
memory-safe language. Furthermore, we recommend changes to the Rust compiler
and to the central Rust repository’s interface to help Rust software developers
be aware of when their Rust code is unsafe.

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Most Liked

timClicks

timClicks

Author of Rust in Action

Thank you! Devtalk is a really wonderful space. It’s great to be part of an enthusiastic community.

DevotionGeo

DevotionGeo

There is a book from newline.co called Fullstack Rust, which teaches actix as well as WebAssembly in rust.

One more thing: I’ve seen the creator Nikolay Kim and other core contributors of actix, fighting over the usage of unsafe. Nikolay was striving for the fastest thing possible, and others were striving for the safest one.
Nikolay Kim left the project and started another library/framework called ntex. Rest of the team replaced almost all the unsafe code with safe code. And the good thing is that actix is still as fast as ntex.

AstonJ

AstonJ

Don’t forget book-hands-on-rust @dwaynebradley :smiley:

Rust in Action’s author @timClicks joined up recently too :smiley:

Ah nice! I didn’t know he started another project and that actix was ‘fixed’ :+1:

Where Next?

Popular Backend topics Top

New
First poster: bot
As I continue to work on Cyberscore, I keep finding new quirks / features in PHP and MySQL. All of the tests below are being run on mysql...
New
CommunityNews
Tails is a minimal, fast Forth-like interpreter core. It uses no assembly code, only C++, but an elegant tail-recursion technique inspire...
New
First poster: bot
In recent months I use Go for the implementation of Proof of Concept in my leisure time, partly to study of Go programming language itsel...
/go
New
First poster: bot
Rubinius began as a metacircular implementation of Ruby and was billed as Ruby in Ruby. Today the core and much of the standard library, ...
New
First poster: bot
GitHub - nanobowers/py2cr: Python3 to Crystal Translation using Python AST Walker. Python3 to Crystal Translation using Python AST Walke...
New
First poster: mafinar
8 Reasons why Clojure is a better Java than Java. Clojure is better than Java at its own game. Using code examples, we dive into what ma...
New
First poster: bot
Building a Neural Network in Pure Lisp without Built-in Numbers using only Atoms and Lists. A neural network written in pure Lisp withou...
New
First poster: adamaiken89
PHP: Frankenstein arrays. PHP has become quite a nice language, but there are some ugly legacies left from the past. Like the deceptive ...
New
First poster: bot
GitHub - codic12/worm: A dynamic, tag-based window manager written in Nim. A dynamic, tag-based window manager written in Nim - GitHub -...
New

Other popular topics Top

AstonJ
A thread that every forum needs! Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
PragmaticBookshelf
Rails 7 completely redefines what it means to produce fantastic user experiences and provides a way to achieve all the benefits of single...
New