Nick Cameron on Design Patterns in Rust & Jamey Sharp on Corrode

This is a past event

41 people went

Mozilla Corp

1120 Nw Couch St # 320 · Portland

How to find us

Front doors of the building and elevators remain open till 7pm. Take elevator to 3rd floor, turn left, enter large glass door labeled "Mozilla". If door is locked, use the buzzer and we'll let you in.

Location image of event venue

Details

We'll have 2 talks again this month!

Design Patterns in Rust:

Nick Cameron is a core contributor on the Rust language's language design, tools, and compiler teams. He's in town for RustConf, and will be sharing his talk on Design Patterns in Rust with us! Here's the abstract:

This talk will cover some of the common idioms and design patterns encountered when programming in Rust.We’ll work through simple idioms used in everyday programming for tasks such as object creation and customisation, resource management, and destruction. We’ll then cover more complex patterns often used in generic data structures and libraries. We’ll also discuss some of the underlying themes and why these idioms and patterns occur in Rust.

The talk will not assume previous experience with Rust. The audience will gain an understanding of programming with Rust and its strengths and weaknesses. For those learning (or intending to learn) Rust, the talk should provide a short-cut to intermediate and advanced programming skills.

Corrode: Automatically Translating C to Rust

C has been the de facto systems programming language for 44 years, which means an awful lot of useful software is written in that language. As excellent as Rust is, it doesn't have that inertia behind it. (Yet!) Rust has good FFI support for calling C functions, plus tools for automatically generating FFI bindings, which make much of that existing software usable for new Rust projects. Still, gaining Rust's full safety advantages requires rewriting existing C software in Rust, which is currently a manual, time-consuming, and error-prone process.

Corrode is a tool that aims to bridge this gap by automatically translating C source code to equivalent Rust. A Corrode-translated program is no safer than the original C was, but it gets the most tedious translation work out of the way so a programmer can focus on taking advantage of Rust's more advanced features.

In this talk we'll explore what Corrode does, and does not, do. We'll discuss interesting examples that will surprise most C programmers, while staying accessible to programmers in any language. We'll look at how Corrode has been tested: the most effective ways are methods not widely used with other software. And we'll evaluate Corrode's documentation and community-building efforts, to both show how you can contribute and suggest steps you might consider for your own projects.

Speaker Jamey Sharp is Corrode's initial author and a programmer experienced in a variety of languages including C, Java, Python, Haskell, and x86 assembly. He is new to Rust, compared to those languages, and Corrode grew out of his learning experiments. (The exercise has been very effective at finding odd corners of both C and Rust...) He recently completed a session as a Recurse Center resident, teaching advanced topics to diverse audiences of programming enthusiasts spanning every skill level, which he enjoyed tremendously.

Other information:

PDXRust meets on the first Wednesday of every month, from 6-8pm, at Mozilla's Portland space. The first hour is either lightning talks from group members or a more in-depth tutorial from a Rust expert, and the second hour is hacking and social time.

Join us in #pdxrust on irc.freenode.net (http://webchat.freenode.net/) with any feedback about what you'd like to see!

Remember that Rust's Code of Conduct (https://www.rust-lang.org/conduct.html) defines the Rust community's expectations for participation.