How to Make Rust Leak Memory (Also: How to Make It Stop)
https://fly.io/blog/rust-memory-leak/ [fly.io]
2022-06-16 18:40
tags:
bugfix
investigation
malloc
programming
rust
Of course you can leak memory, even in Rust. For even medium-sized long-running applications, lots of graphs from a good memory profiler can make life better. And they’ll probably help you find the memory leak too.
How to speed up the Rust compiler in April 2022
https://nnethercote.github.io/2022/04/12/how-to-speed-up-the-rust-compiler-in-april-2022.html [nnethercote.github.io]
2022-04-13 20:08
tags:
compiler
development
perf
rust
update
In my last post I introduced the Compiler performance roadmap for 2022. Let’s see how things are progressing.
Along the way I had to undo some optimizations I had added to this code a couple of years ago. Those optimizations turned out to be useful for one kind of expensive macro (with many rules but no metavariables) present in the html5ever benchmark. But such macros aren’t common in practice, and these optimizations were unhelpful for more typical expensive macros, which are recursive, have fewer rules, and use metavariables. This shows the value of a good benchmark suite.
source: L
Why Rust mutexes look like they do
http://cliffle.com/blog/rust-mutexes/ [cliffle.com]
2022-04-02 05:25
tags:
concurrency
programming
rust
In the rest of this post I’ll walk through a typical C mutex API, compare with a typical Rust mutex API, and look at what happens if we change the Rust API to resemble C in various ways.
source: HN
Cranelift, Part 3: Correctness in Register Allocation
https://cfallin.org/blog/2021/03/15/cranelift-isel-3/ [cfallin.org]
2021-03-19 23:12
tags:
compiler
compsci
development
fuzzing
jit
programming
rust
testing
In this post, I will cover how we worked to ensure correctness in our register allocator, regalloc.rs, by developing a symbolic checker that uses abstract interpretation to prove correctness for a specific register allocation result. By using this checker as a fuzzing oracle, and driving just the register allocator with a focused fuzzing target, we have been able to uncover some very interesting and subtle bugs, and achieve a fairly high confidence in the allocator’s robustness.
source: HN
Rust after the honeymoon
http://dtrace.org/blogs/bmc/2020/10/11/rust-after-the-honeymoon/ [dtrace.org]
2020-10-11 20:55
tags:
development
programming
rust
So Rust is going really well for us at Oxide, but for the moment I want to focus on more personal things — reasons that I personally have enjoyed implementing in Rust. These run the gamut: some are tiny but beautiful details that allow me to indulge in the pleasure of the craft; some are much more profound features that represent important advances in the state of the art; and some are bodies of software developed by the Rust community, notable as much for their reflection of who is attracted to Rust (and why) as for the artifacts themselves.
source: L
Rust programming language exploit mitigations
http://rcvalle.blog/2020/09/16/rust-lang-exploit-mitigations/ [rcvalle.blog]
2020-10-02 21:28
tags:
compiler
defense
development
rust
security
This section documents the exploit mitigations applicable to the Rust compiler when building programs for the Linux operating system on the AMD64 architecture and equivalent.
source: L
Implementing a Type-safe printf in Rust
https://willcrichton.net/notes/type-safe-printf/ [willcrichton.net]
2020-08-17 04:35
tags:
programming
rust
text
type-system
I show how to use heterogeneous lists and traits to implement a type-safe printf in Rust. These mechanisms can ensure that two variadic argument lists share important properties, like the number of format string holes matches the number of printf arguments.
source: HN
"Rust does not have a stable ABI"
https://people.gnome.org/~federico/blog/rust-stable-abi.html [people.gnome.org]
2020-08-17 04:28
tags:
development
library
programming
rust
Or more exactly, why does this happen, and why do people perceive it as a problem?
source: L
xi-editor retrospective
https://raphlinus.github.io/xi/2020/06/27/xi-retrospective.html [raphlinus.github.io]
2020-07-01 00:55
tags:
compsci
concurrency
development
programming
rust
swtools
text
I still believe it would be possible to build a high quality editor based on the original design. But I also believe that this would be quite a complex system, and require significantly more work than necessary.
A few good ideas and observations could be mined out of this post.
source: L
Five Years of Rust
https://blog.rust-lang.org/2020/05/15/five-years-of-rust.html [blog.rust-lang.org]
2020-05-15 14:44
tags:
rust
update
With all that’s going on in the world you’d be forgiven for forgetting that as of today, it has been five years since we released 1.0 in 2015! Rust has changed a lot these past five years, so we wanted reflect back on all of our contributors’ work since the stabilization of the language.
source: L
Notes on Parsing in Rust
https://blog.wesleyac.com/posts/rust-parsing [blog.wesleyac.com]
2020-04-30 22:37
tags:
library
programming
rust
text
I’ve recently been writing a bit of parsing code in Rust, and I’ve been jumping back and forth between a few different parsing libraries - they all have different advantages and disadvantages, so I wanted to write up some notes here to help folks who are undecided choose what libraries and techniques to consider, and also to offer some suggestions for the future of the Rust parsing ecosystem.
source: L
Recent and future pattern matching improvements
https://blog.rust-lang.org/inside-rust/2020/03/04/recent-future-pattern-matching-improvements.html [blog.rust-lang.org]
2020-03-07 18:39
tags:
programming
rust
update
Much of writing software revolves around checking if some data has some shape (“pattern“), extracting information from it, and then reacting if there was a match. To facilitate this, many modern languages, Rust included, support what is known as “pattern matching”.
source: L
Rust Ownership Rules
https://www.geekabyte.io/2020/02/rust-ownership-rules.html [www.geekabyte.io]
2020-03-03 03:26
tags:
intro-programming
rust
In this post, I took the opportunity to re-summarise what I consider to be the essence of this ownership rules in Rust.
source: L
Allocator Designs
https://os.phil-opp.com/allocator-designs/ [os.phil-opp.com]
2020-02-05 05:48
tags:
malloc
programming
rust
rust
systems
This post explains how to implement heap allocators from scratch. It presents and discusses different allocator designs, including bump allocation, linked list allocation, and fixed-size block allocation. For each of the three designs, we will create a basic implementation that can be used for our kernel.
The Soundness Pledge
https://raphlinus.github.io/rust/2020/01/18/soundness-pledge.html [raphlinus.github.io]
2020-01-19 04:50
tags:
development
library
programming
rust
This post is an opportunity to share some thoughts I’ve had about soundness, Rust, and open source community.
I believe one of the most important contributions of Rust is the cultural ideal of perfect soundness: that code using a sound library, no matter how devious, is unable to trigger undefined behavior (which is often thought of in terms of crashes but can be far more insidious). Any deviation from this is a bug. The Rust language itself clearly subscribes to this ideal, even as it sometimes falls short of attaining it (at this writing, there are 44 I-unsound bugs, the oldest of which is more than 6 years old).
source: L
Translating Quake 3 into Rust
https://immunant.com/blog/2020/01/quake3/ [immunant.com]
2020-01-07 19:46
tags:
c
programming
rust
The Rust-loving team at Immunant has been hard at work on C2Rust, a migration framework that takes the drudgery out of migrating to Rust. Our goal is to make safety improvements to the translated Rust automatically where we can, and help the programmer do the same where we cannot. First, however, we have to build a rock-solid translator that gets people up and running in Rust. Testing on small CLI programs gets old eventually, so we decided to try translating Quake 3 into Rust. After a couple of days, we were likely the first people to ever play Quake3 in Rust!
source: L
Stop worrying about blocking: the new async-std runtime, inspired by Go
https://async.rs/blog/stop-worrying-about-blocking-the-new-async-std-runtime/ [async.rs]
2019-12-17 00:45
tags:
concurrency
library
programming
release
rust
async-std is a mature and stable port of the Rust standard library to its new async/await world, designed to make async programming easy, efficient, worry- and error-free.
Today, we’re introducing the new async-std runtime. It features a lot of improvements, but the main news is that it eliminates a major source of bugs and performance issues in concurrent programs: accidental blocking.
source: L
Real hardware breakthroughs, and focusing on rustc
https://www.redox-os.org/news/focusing-on-rustc/ [www.redox-os.org]
2019-11-28 18:38
tags:
rust
systems
update
After the addition of the NVMe driver a couple months ago, I have been running Redox OS permanently (from an install to disk) on a System76 Galago Pro (galp3-c), with System76 Open Firmware as well as the un-announced, in-development, GPLv3 System76 EC firmware . This particular hardware has full support for the keyboard, touchpad, storage, and ethernet, making it easy to use with Redox.
Building Redox OS on Redox OS has always been one of the highest priorities of the project. Rustc seems to be only a few months of work away, after which I can begin to improve the system while running on it permanently, at least on one machine. With Redox OS being a microkernel, it is possible that even the driver level could be recompiled and respawned without downtime, making it incredibly fast to develop for. With this in place, I would work more efficiently on porting more software and tackling more hardware support issues, such as filling in the USB stack and adding graphics drivers.
source: HN
Rust 2020: GUI and community
https://raphlinus.github.io/rust/druid/2019/10/31/rust-2020.html [raphlinus.github.io]
2019-11-10 05:01
tags:
development
rust
In response to the call for blogs about the vision for Rust for 2020, I’m going to write about GUI. I believe the time is right for a native GUI toolkit written in Rust, and that such a thing would fill a very important niche. There is a demand for performance (which, to me, includes startup time, RAM footprint, and binary size), and Rust is in the best position to deliver on that.
source: HN
Async-await on stable Rust!
https://blog.rust-lang.org/2019/11/07/Async-await-stable.html [blog.rust-lang.org]
2019-11-08 02:00
tags:
concurrency
programming
release
rust
update
On this coming Thursday, November 7, async-await syntax hits stable Rust, as part of the 1.39.0 release. This work has been a long time in development -- the key ideas for zero-cost futures, for example, were first proposed by Aaron Turon and Alex Crichton in 2016! -- and we are very proud of the end result. We believe that Async I/O is going to be an increasingly important part of Rust’s story.
https://blog.rust-lang.org/2019/11/07/Rust-1.39.0.html