Export or edit this event...

Portland Linux/Unix Group: Rust

PSU Maseeh Engineering Building
1930 SW 4th Avenue
Portland, OR 97201, US (map)

On the lower level, follow the signs.



Who: Jim Blandy
What: Rust
Where: PSU, 1930 SW 4th Ave. Room FAB 86-01 (Lower Level)
When: Thursday, January 7th, 2016 at 7pm
Why: The pursuit of technology freedom
Stream: http://pdxlinux.org/live

Rust is meant to compete with C and C++ in performance, but also provide memory safety. Someone has written a small kernel in Rust.

Rust is only attractive to JavaScript / Python types when they run into a problem where memory consumption or processor consumption is a real limiting factor. Then, it's much easier for them to transition into Rust than C/C++, but Rust gives them the performance they need.

Some Rust killer apps:

  • Mozilla's experimental browser engine, Servo (which outperforms Firefox on a single core, and destroys it when running on four cores);
  • Tilde's Skylight profiling system for Rails apps, which uses Rust to handle the voluminous data produced by running apps: http://www.tilde.io/skylight/

  • OpenDNS, which is again using Rust to handle large amounts of data in real time:


Added focus: Concurrency first in Rust

Multiprocessor machines are everywhere: even mid-range mobile devices now often have more than one processor core. But writing concurrent code in C and C++ is challenging even for experienced developers: data races are notoriously difficult to debug, and concurrency makes ordinary memory bugs harder to reproduce. So programmers usually turn to concurrency as a last resort, only after they’ve squeezed as much performance out of their single-threaded code as possible.

But what if concurrency were practical as a method of “first resort?” What if we could design ordinary programs around the opportunities for parallelism they present, without introducing risk and making our code hard to maintain for all but the wizards?

Rust is a new systems programming language from Mozilla, designed for memory safety and trustworthy concurrency. Rust catches data races and memory errors at compile time: you can’t forget to lock the right mutex before accessing shared data, nor can you modify a data structure after handing it off to another thread, nor can you free data that another thread was using, and so on. Rust does not use garbage collection, but instead relies on a simple set of rules for ownership, moving, and borrowing to prevent the kinds of memory errors that plague concurrent C and C++ code. Mozilla has used Rust to implement an experimental browser engine named Servo, which already outperforms Firefox’s Gecko engine on real-world web sites.

This talk will demonstrate various styles of concurrent code in Rust: message passing, shared data protected by mutexes, and lock-free algorithms using atomic memory operations. We’ll show how Rust’s ownership rules, unique among production programming languages, prevent data races. And we’ll show how to take responsibility for correctness yourself when the compiler is too strict, using Rust’s ‘unsafe’ mode.

Many will head to the Lucky Lab at 1945 NW Quimby St. after the meeting.

Rideshares Available

PLUG is open to everyone and does not tolerate abusive behavior on its mailing lists or at its meetings.