Free Trial
01/12/2026
Blog
-
#C-rusted

C-rusted Explorer: Verify C code in your browser

A few years ago we raised a question that matters to anyone who maintains a C codebase: could we bring the guarantees of Rust-style ownership and borrowing to the C we already ship, without rewriting it or replacing the production compiler?

It was in 2023 that we first launched C-rusted. The idea had been brewing in our minds for a while, as we started taking a closer look at Rust, just like many others in the industry. The benefits of Rust were undisputed, of course, but what about the existing C code embedded in thousands of devices, compilers, tools and libraries? What if C could embrace the guarantees of Rust, and go even further? That’s exactly what C-rusted is all about.  — Abramo Bagnara, BUGSENG CTO

In this blog, you can get a sense of how far the work has come, take a look at the first-ever C-rusted analyzer developed by BUGSENG and play with it in your browser, even with your own C code.

C-rusted in short

C-rusted is a statically verified dialect of standard ISO C. With C-rusted, you don’t have to rewrite your existing C codebase to start benefiting from ownership-based static analysis, you can incrementally annotate a C interface to say who owns a resource, how many bytes a function may read or which physical quantity it must return. The C-rusted Analyzer checks those contracts against the code, one function at a time. Your production compiler builds the executable as before, with no added run-time overhead.

Learn more

DOWNLOAD THE PAPER

 

The C-rusted Explorer

The C-rusted Explorer puts the C source and the analysis results side by side in your browser. Click a finding to jump to the line it refers to. Edit the code and run the Analyzer again: if the example satisfies the checks, the results pane reads “No findings.”

Try it with one line of C

Open Writing after unlock and click Analyze. The Analyzer flags a write to shared data after the lock has been released. Now open Writing with the lock held. Moving unlock() after the write lets the Analyzer verify that the function holds the lock when it writes and releases it before returning.

Next, try Single read: forwarding the capacity. The buffer holds 64 bytes, but a short read might fill only 17. Pass all 64 to fwrite and the output could include 47 uninitialized bytes. Pass the count returned by fread instead, and the Analyzer verifies that every byte offered to the output stream was initialized by the read, regardless of how many bytes came in.

The Explorer has more than 60 editable examples. Pick one and change a line, or try a small, non-confidential snippet of your own.

How to verify C one interface at a time

Where do you put a contract, and what can callers rely on once the Analyzer checks it? The revised paper shows this with a queue that takes ownership of a ticket only if it accepts it. If the queue declines, the caller remains responsible for the ticket. The same contract notation can distinguish volts from amperes even though both are stored as double.

Read the paper and run its examples in the Explorer. Search for paper in the example list.

Try it on your codebase

Start with a function or interface where a stronger guarantee would matter. The Analyzer checks the annotated code separately from ordinary compilation, so you can keep your production compiler and build system and extend verification as needed. The annotations add no run-time checks.

TRY IT NOW

Which rule in your codebase would you want to check first? We’d like to hear from teams interested in an industrial pilot and from compiler, verification-tool, and development-platform vendors interested in bringing C-rusted to their users.