A cable-stayed bridge under construction, with two towers and a gap in the middle where the two halves of the deck have not yet been joined.

Workshop: 3 days

Migrating C to Rust

Bookable for teams – on-site or remote

Workshop description

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Get in touch
1

We will cover the essentials of FFI-safe Rust: extern "C", ABI considerations, #[no_mangle], and when to use repr(C).

2

We will look at how Rust links C code in practice: the -sys crate pattern, using build.rs, integrating with existing build systems, and generating bindings with bindgen — followed by how to build safe abstractions on top of unsafe bindings.

3

We will translate common C idioms into idiomatic Rust: iterators instead of manual loops, return values vs out-parameters, vtables vs traits (and when to keep the C shape), strings and encodings (CStr vs str), return codes vs errors, as well as bitflags.

4

Testing, benchmarks, sanitizers, and more. We will put our FFI code on solid foundations. We will learn how to effectively use tools like Valgrind, sanitizers, and Miri. We will discover their limitations and when to reach for which tool.

Your mentor

Luca Palmieri

Principal Engineering Consultant

Luca Palmieri builds technology products for a living. His current focus is on backend development, software architecture and the Rust programming language. He is the author of "Zero to Production in Rust".

Book this workshop

Our mentors look forward to working with your team and unlocking new capabilities.
Your message is being sent…

Unable to send message.

Please try again later or contact us at [email protected]

Thank you!

We will be in touch soon.

Not the right workshop for you?

Take a look at our wide range of workshops to take your team to the next level
Our workshops

Stay up to date on Rust

Subscribe to our newsletter and stay up to date about the latest events, workshops, and other news around Rust.