By Alexander Walter (ERNI Switzerland)
Part 3 of 3 in the series Rust in MedTech
As mentioned in the part 1 and part 2, memory-safety bugs are among the most common and most expensive defects in medical device software, and regulators increasingly expect manufacturers to show how they prevent them. Rust rejects most of these bugs before the software ever runs. For most MedTech teams, the open question is therefore no longer whether the language works, but how to introduce it without putting a certified product at risk.
This article describes a step-by-step adoption path within the existing IEC 62304 process, the toolchains that are already qualified, the limits that still need engineering judgement, and a 12-week pilot that turns the question into an evidence-based decision.
Keyhole surgery: adopting Rust without disruption
Rewriting certified device software from scratch is rarely an option: it means new verification, new documentation and new risk. Rust allows a gentler approach, comparable to keyhole surgery. Legacy code is replaced one component at a time while the product keeps shipping. Each step follows the same pattern:
- Pick one component. Choose a part with a clear boundary and a visible cost or risk, such as a message parser or an update checker.
- Keep its interface. The new Rust version exposes exactly the same C-compatible interface as the old one. Tools such as cbindgen generate the matching C header automatically. This boundary is where C and Rust meet, so it gets the most careful review.
- Swap it in. The Rust component is compiled into a library and linked into the existing C or C++ firmware in place of the old code. The rest of the firmware source stays untouched; the build system gains one Rust compilation step.
- Verify and release through the existing process. After linking, the result is an ordinary binary. The change follows the usual IEC 62304 change process: impact analysis, verification of the new unit, regression testing and documentation of the Rust toolchain and any third-party libraries. This effort has to be planned and budgeted; signing, packaging and release stay as they are.
- Repeat where it pays off. The next component follows the same path.
Over time, Rust takes over where it delivers value, while proven code stays in C. There is a second reason why this works: data from a major technology company’s mobile operating system shows that most vulnerabilities sit in new or recently changed code, while old code becomes safer over time. Writing new and changed components in Rust therefore captures much of the benefit without touching proven legacy code.
Certified toolchains are available
For regulated products, the toolchain matters as much as the language:
- Ferrocene: the first Rust toolchain qualified for IEC 62304 Class C (January 2025). It is also qualified for ISO 26262 ASIL D and IEC 61508 SIL 3.
- AdaCore and HighTec: both offer Rust compilers qualified for ISO 26262 ASIL D.
- Certified core library: Ferrocene’s certified subset of the Rust core library currently reaches IEC 61508 SIL 2 and ISO 26262 ASIL B. We are not aware of an IEC 62304 certification of this subset, and toolchain qualification applies to specific target platforms.
- Coding guidelines: MISRA has published guidance on how its C rules apply to Rust (MISRA C:2025 Addendum 6), and the Safety-Critical Rust Consortium, founded in 2024 under the Rust Foundation, is developing coding guidelines for safety-critical Rust.
Certification remains, of course, a matter for each product.
The first signals from the medical field are visible, including in Switzerland. A Zurich-based start-up is building its monitoring device in Rust, together with the team behind the Ferrocene toolchain. A Danish patient-monitoring company runs its fleet of healthcare devices on an open-source Rust device manager. A developer at a manufacturer of IEC 62304 Class B devices reported in 2026 that all of their product code deployed to customers is written in Rust. Job postings from insulin-pump and patient-monitoring manufacturers now ask for Rust experience.
Neighbouring safety-critical industries are further ahead. A Norwegian manufacturer’s 3D ultrasonic safety sensor for industrial robots, with its safety functions written in Rust, was certified to IEC 61508 SIL 2 and ISO 13849 PL d in June 2026 and is now in series production. A car manufacturer has also shipped a Rust-based control unit in production vehicles.
ERNI’s own team is already building medical products in Rust. For a Swiss manufacturer, we are developing new device software within an IEC 62304 process.
Honest limits
Rust adoption still needs engineering judgement:
- Coverage: MC/DC coverage (proof that every condition in every decision has been tested on its own) is required by some safety standards outside medicine and is used by some teams for IEC 62304 Class C software. The standard Rust compiler cannot measure it yet; work on this is under way.
- Dependencies: third-party crates (ready-made Rust libraries from the community) count as SOUP, software of unknown provenance, under IEC 62304. The standard requires each one to be identified by name and version and assessed for risk. In practice, teams pin the version, keep a copy in their own repository and review it, including any code it runs during the build. The same applies to the toolchain itself: pin and archive the exact compiler version for the product’s lifetime, as you would with a C compiler.
- Hardware support: vendor support for microcontrollers is growing but still uneven; check the HAL, debugger and RTOS support for your target early.
- Learning curve: Rust’s compiler is strict, and ownership and borrowing are new concepts for most C and C++ developers. Teams therefore start more slowly and typically need a few months to reach their previous pace. Training, an experienced Rust engineer in the team and a well-chosen first project shorten this phase.
- Architecture and authentication: Rust does not fix weak authentication, hard-coded passwords or insecure interfaces. These remain the most common findings in medical device advisories and need secure design, whatever the language.
Start with a trial
MedTech companies know how to introduce something new in a controlled way: with a clinical trial. The same logic works for Rust. We recommend a focused pilot of about 12 weeks, longer than in other industries, because it includes the documentation your quality system requires:
- Protocol: select one bounded component with visible cost or risk, such as a Bluetooth message parser, an event log, an update package checker or a diagnostic readout service. Define the hypothesis and the success criteria.
- Baseline: measure the current state: defects, review and debugging effort, integration effort, CPU and memory use.
- Intervention: implement the component in Rust behind a narrow C interface, using the real hardware, toolchain and quality process.
- Endpoints: compare the results with the baseline, together with team feedback and the effort needed to maintain the new code.
- Decision: scale, pause or stop, based on the criteria agreed at the start.
The decision gate at the end is essential. It turns Rust from a technology bet into an evidence-based decision.
Is your product a candidate?
Rust is worth a closer look if you answer yes to at least two of these questions:
- Does your device or its app parse data from Bluetooth, NFC, networks or update packages?
- Will the product stay in the field for 10 years or more, with several variants?
- Is a new product generation or a major redesign of a component planned within the next two years?
- Do you maintain the same logic in firmware, app and cloud?
- Are customers or hospital procurement teams asking about your cybersecurity and memory-safety strategy?
Two or more yes answers? Then the next step is a 90-minute workshop. Bring an architecture diagram and your most expensive component; you will leave with a shortlist of candidates and an outline for a pilot.
Conclusion
For MedTech manufacturers, memory safety is becoming an expectation of customers, hospitals and regulators. The way to meet it without risking certified products is to start where exposure, lifecycle cost or performance pressure already hurts, and to test Rust there under real conditions.
ERNI has supported MedTech companies for more than 30 years as an ISO 13485-certified engineering partner, from IEC 62304-compliant development and test automation to usability engineering and cybersecurity.
Our Rust team combines this regulatory experience with hands-on Rust engineering:
- Rust for MedTech workshop (90 minutes): together we map your architecture and constraints, identify candidate components and outline the success criteria for a pilot. You leave with a shortlist and a clear recommendation, whether or not you continue with us.
- Memory-safety roadmap: we assess your codebase and define where Rust, hardening or other measures reduce risk most, documented so that you can share it with customers, hospitals and auditors.
- 12-week pilot: we implement the first component with your team, integrate it into your toolchain and quality process, and measure the results against the agreed criteria.
- Training and capacity: Rust training for C and C++ teams, and experienced Rust engineers who join your team when you need them.
Prevention beats cure, in medicine and in software. Let’s find out where Rust can prevent your next field action.