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.

All Rust Workshops

Migrating C to Rust

3 days Bookable for teams – on-site or remote

About This Workshop

Migrating C code to Rust is rarely a single “rewrite” step. It’s a process that forces you to weave together these two very different systems. Calling conventions, memory management, tooling, and (most importantly) how you structure and test your code. These things can quickly explode in complexity if misunderstood or incorrectly managed.

We designed this workshop to give your team a coherent path from “I can write Rust” to “I can ship Rust in a C codebase” without hand-waving over these complexities.

We start from the fundamentals of C/Rust interoperability and gradually build up to a pragmatic module rewrite process, touching on performance, testing, debugging, and long-term maintainability.

By the end of the workshop, you will have a clear mental model of Rust’s FFI boundaries, know how to design FFI-friendly APIs, have written plenty of (correct) unsafe code, and have a concrete playbook to migrate real modules with confidence.

The workshop is designed for software developers working in or around C/C++ codebases. Familiarity with Rust basics is helpful, but we’ll introduce the concepts you need as we go.

Bookable for teams

3 days

On-site or remote

Book for your team

Syllabus

  1. The basics

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

    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. Idiomatic FFI

    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, and Sanitizers

    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.

FAQ

Placeholder! What software do I need to have?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl. Ut eu sollicitudin magna. Nullam varius neque ante, a pulvinar ipsum luctus id.

Placeholder! What hardware do I need to have?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl. Ut eu sollicitudin magna. Nullam varius neque ante, a pulvinar ipsum luctus id.

Placeholder! How will the workshop be held?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl. Ut eu sollicitudin magna. Nullam varius neque ante, a pulvinar ipsum luctus id.

Placeholder! How will the workshop be held?

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl. Ut eu sollicitudin magna. Nullam varius neque ante, a pulvinar ipsum luctus id.

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".

Who we are

We are Mainmatter and we Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in nisi sed eros eleifend scelerisque a eu nisl.

Rust Workshops

We offer a range of workshops bookable for teams that want to grow – on-site or remote. We're also happy to prepare custom workshops – get in touch with us to talk about what curriculum fits your team best!

We are Trusted by

Bookable for teams

3 days

On-site or remote

Book for your team

Can't Find the Right Workshops for Your Team?

We are happy to tailor the curriculum to your needs. We can combine multiple workshops, pick and choose modules, as well as develop new content if desired.
Get in Touch

Book This Workshop

Our mentors look forward to working with your team and unlocking new capabilities.

Send us a message

Your message is being sent…

Unable to send message.

Please try again later or contact us at info@mainmatter.com

Thank you!

We will be in touch soon.

Migrating C to Rust