Closing the gap: cross-language LTO between Rust and C/C++
> Link time optimization (LTO) is LLVM’s way of implementing whole-program optimization. Cross-language LTO is a new feature in the Rust compiler that enables LLVM’s link time optimization to be performed across a mixed C/C++/Rust codebase. It is also a feature that beautifully combines two respective strengths of the Rust programming language and the LLVM compiler platform:
> Today, we’re introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more.
Thoughts on Rust bloat
> I’m about to accept a PR that will increase druid’s compile time about 3x and its executable size almost 2x. In this case, I think the tradeoff is worth it (without localization, a GUI toolkit is strictly a toy), but the bloat makes me unhappy and I think there is room for improvement in the Rust ecosystem.
> This project contains small exercises to get you used to reading and writing Rust code. This includes reading and responding to compiler messages!
> Sandspiel is a falling sand game I built in late 2018. I really enjoyed writing this game, and wanted to put into writing some of my goals, design decisions, and learnings from that process.
What I Learnt Building a Lobsters TUI in Rust
> As a learning and practice exercise I built a crate for interacting with the Lobsters programming community website. It’s built on the asynchronous Rust ecosystem. To demonstrate the crate I also built a terminal user interface (TUI).
Announcing Rust 1.34.0
> The largest feature in this release is the introduction of alternative cargo registries.
A Love Letter to Rust Macros
> This is not meant to be an in-depth look at what makes Rust’s macro system good, or explain more advanced usages and caveats. Mainly, I’m writing this article for people who haven’t had the chance (or motivation) to try out macros, or even Rust in general. I want to highlight cool things you can do with them, and I want people to look at this and go: “Damn, I should try this.”
zkp: a toolkit for Schnorr proofs
> About two years ago, I made a proof-of-concept library called zkp, which used Rust macros to auto-generate an implementation of proving and verification for a class of Schnorr-style discrete logarithm proof statements. However, this approach had a number of limitations and wasn’t suitable for use in real applications. Today, I published a new and completely rewritten version of the library, which is now available on crates.io.
Five Super Helpful Rust Things That Nobody Told You About
> no refund if someone did actually tell you about them already
rustgo: calling Rust from Go
> This post is the story of a slightly-less-than-sane experiment to call Rust code from Go fast enough to replace assembly. No need to know Rust, or compiler internals, but knowing what a linker is would help.
Repost, but it’s just so delicious.
Implementing a static stack usage analysis tool
> Stack usage analysis consists of three steps: first, computing the stack usage of every function (subroutine) in the program, then computing the full call graph of the program and finally using these two pieces of information to compute the worst-case stack usage.
Implications of Rewriting a Browser Component in Rust
> The style component is the part of a browser that applies CSS rules to a page. This is a top-down process on the DOM tree: given the parent style, the styles of children can be calculated independently—a perfect use-case for parallel computation. By 2017, Mozilla had made two previous attempts to parallelize the style system using C++. Both had failed.
Comparing C and Rust network protocol exercises
> Almost by accident, it turned out that I implemented a pretty simple, but non trivial task in both C and Rust and blogged about them. Now that I’m done with both of them, I thought it would be interesting to talk about the differences in the experiences.
> In this post we learned how a recursive level 4 table entry can be used to map all page table frames to calculatable virtual addresses. We used this technique to implement an address translation function and to create a new mapping in the page tables.
Is It Time to Rewrite the Operating System in Rust?
> Bryan Cantrill explores Rust, explains why it has captured the imagination of so many systems software engineers, and outlines where it might best fit in the deep stack of operating system software.
Plus some history of operating systems.
The Firecracker virtual machine monitor
> Cloud computing services that run customer code in short-lived processes are often called “serverless”. But under the hood, virtual machines (VMs) are usually launched to run that isolated code on demand. The boot times for these VMs can be slow. This is the cause of noticeable start-up latency in a serverless platform like Amazon Web Services (AWS) Lambda. To address the start-up latency, AWS developed Firecracker, a lightweight virtual machine monitor (VMM), which it recently released as open-source software. Firecracker emulates a minimal device model to launch Linux guest VMs more quickly. It’s an interesting exploration of improving security and hardware utilization by using a minimal VMM built with almost no legacy emulation.
Patterns of Refactoring C to Rust: The case of librsvg
> A year has passed, and now we have a team of people working on the Rustification of librsvg. I want to show you how we are doing it, and some common code patterns that have emerged.
String Representations and String APIs
C, swift, rust, unicode, etc. link collection.
Summer School With The Rust Compiler
Not sure if I learned more about rust or ruby here.
> Rust is telling me that iter() yielded references to integers, but my code expected an actual integer, not a reference to an integer.
> Now the array was mutated! It turns out Ruby passed integers to the closure by value, but strings by reference. Updating each string inside the loop also updated that string inside the array.
I managed to be surprised by both those statements.