Ruby is a productive language that developers love. When Ruby isn't fast enough, they often fall back to writing C extensions. But C extensions are scary for a number of reasons; it's easy to leak memory, or segfault the entire process. When we started to look at writing parts of the Skylight agent using native code, Rust was still pretty new, but its promise of low-level control with high-level safety intrigued us. We'll cover the reasons we went with Rust, how we structured our code, and how you can do it too. If you're looking to expand your horizons, Rust may be the language for you.
Rust exposes a lot of ways to traverse a collection: iter, iter_mut, into_iter, and drain to name a few! This isn't a case of over-engineering: each of these kinds of iterator necessarily falls out of Rust caring about ownership, and encoding it in the type system. However even all these iterators still aren't enough to capture all the subtleties of ownership and traversal!
This talk surveys the advantages, weaknesses, and motivation of the current iterator APIs, as well as hypothetical future iterator APIs that could complete our iteration story such as Cursor and MutexIterator.
Many new Rustaceans dive in with experience almost exclusively in a higher level, GC'd language. To them, terminology from systems programming can be overwhelming and cryptic...but it doesn't have to be! With side-by-side Rust, Ruby, and Python examples, we can dive into the world of pointers, heaps, and stacks that will let you reason better about your programs, no matter what language you are using!
Rust is new, but it's not that new! We'll hear from two folks using Rust in Production, with their teams and companies behind them. They'll tell us about some of the struggles, the triumphs, and how they made the decisions that led them where they are.
Time series databases are the backbone of metrics gathering in large computer systems. The most popular service is a difficult to understand and suboptimal implementation done in Python. Rust's strong typing, safe data reuse, standardized build tool, and easy integration with performance tools have made it possible to build a high performance replacement.
This talk will cover the rearchitecture of the popular graphite metric system redone entirely in Rust and currently used in production. This is not a line-for-line rewrite but it is compatible with the wire protocol and disk format.
The talk covers how to use MIO (a lightweight non-blocking IO event loop in Rust) to write fast IO applications with Rust. It will introduce MIO's network & timeout APIs and show how to use them to create a network server. The talk will then discuss some strategies for using MIO in a multithreaded environment.
One of the best things about Rust is how easy it is to integrate Rust with applications or libraries written in C. But while Rust provides all of the tools you need to get the job done, getting started with the FFI APIs can be tricky. To make matters worse, this kind of Rust programming is full of unsafe code.
In this talk, I will cover the basics of using Rust from C (and vice versa), based on over a year of writing production Rust code that makes heavy use of FFI bindings.
The compiler knows a lot about your programs. That knowledge can let you build sophisticated tools for analysing and mutating code.
I'll give a basic overview of the architecture of the compiler and the phases of compilation. I'll cover some of the APIs you can use to get at the results of program analysis. I'll show how tools for cross-referencing, refactoring, and reformatting work with the compiler, and I'll work through a simple tool in detail. By the end of the talk, you should know what the compuler does and be able to start writing your own tools based on the compiler's analyses.