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

First poster: bot
Typing is Hard Type Checking and Type Inference Common terms Completeness Soundness Decidability Hindley-Milner Type System Dependent t...
New
First poster: bot
One of Haskell’s features that I really liked was list comprehensions, so I was very pleased to discover how nice Julia’s comprehensions ...
New
First poster: dimitarvp
Researches on glue systems have a long history, although the problem usually lures hackers instead of academics. Rick Hickey, the creato...
New
CommunityNews
Multicore OCaml by kayceesrk · Pull Request #10831 · ocaml/ocaml. This PR adds support for shared-memory parallelism through domains and...
New
CommunityNews
Martin Thompson On How To Manage Software Complexity | The Engineering Room Ep. 4. In this episode, Dave Farley chats with Martin Thomps...
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: bot
GitHub - Vexu/arocc: A C compiler written in Zig… A C compiler written in Zig. Contribute to Vexu/arocc development by creating an accou...
New
First poster: bot
GitHub - vitalik/django-ninja: :dash: Fast, Async-ready, Openapi, type hints based framework for building APIs. :dash: Fast, Async-rea...
New
First poster: herbert
Why Rust should not have provided unwrap. I see the unwrap function called a lot, especially in example code, quick-and-dirty prototype ...
New
First poster: bot
not-common-lisp-to-julia.org. GitHub Gist: instantly share code, notes, and snippets.
New

Other popular topics Top

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
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
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New