November 22, 2026

c2pa-rs: what the C2PA Rust library is, and how to read Content Credentials with it

Short answer: c2pa-rs is the official open-source Rust library for C2PA, the standard behind Content Credentials. It's maintained by the Content Authenticity Initiative (CAI) on GitHub as contentauth/c2pa-rs and published to crates.io as the c2pa crate. It can read and validate a file's C2PA manifest, and create, sign and embed new ones. It's dual-licensed MIT and Apache 2.0, and still labelled beta.

If you only want to inspect a file, you probably don't need the library at all: the c2patool command-line tool is built on it and does the job in one command.

Most results for this search are the GitHub repo itself, mirrors of it, and docs.rs pages for old versions. Several show snippets from 0.25 or 0.32 and install steps the project has since dropped. None of them tell you which piece of the project to pick, or what a "valid" result actually proves. This page covers both, as of November 2026.

What's in the c2pa-rs project

According to the project's README and the CAI's GitHub organisation:

So "c2pa rs" is the engine. Most people meet it through one of the wrappers.

Version and stability

Which file formats it handles

The project's supported-formats list includes JPEG, PNG, WebP, GIF, TIFF, AVIF, HEIC/HEIF, JPEG XL, DNG, SVG, MP4, MOV, AVI, MP3, M4A, WAV, FLAC and PDF, plus standalone .c2pa manifest-store files. Sony ARW and Nikon NEF are read-only. Plain text needs an unstable feature flag.

Reading a manifest from Rust

Add the crate to Cargo.toml:

[dependencies]
c2pa = "0.92"

The crate's own documentation shows reading a manifest like this:

use c2pa::{assertions::Actions, Reader};

let stream = std::fs::File::open("tests/fixtures/C.jpg")?;
let reader = Reader::default().with_stream("image/jpeg", stream)?;
println!("{}", reader.json());

if let Some(manifest) = reader.active_manifest() {
    let actions: Actions = manifest.find_assertion(Actions::LABEL)?;
    for action in actions.actions {
        println!("{}\n", action.action());
    }
}

reader.json() gives you the whole manifest store as JSON. The active manifest is the most recent one, the record of the last signed change. Its c2pa.actions assertion lists what was done to the file, for example c2pa.created or c2pa.edited, which is where AI generators record that they made the image.

Without a trust list, "valid" only means intact. To check the signer against the official C2PA trust list, the docs show building a Context with settings whose trust.trust_anchors value holds the PEM contents of that list, then creating the reader with Reader::from_context(context). Skip that and you can learn that a manifest is well-formed and unmodified, but not whether anyone you'd recognise signed it.

Feature flags worth knowing

From the crate docs:

Signing with c2pa-rs, briefly

Writing is done with a Builder: you give it a manifest definition, add assertions and ingredients, and call a save method that signs and embeds the result. The signer is built from settings on the Context, or you supply your own through the Signer trait. The crate also ships callback, async and ephemeral signer types for keys that aren't simply a file on disk.

The part tutorials gloss over: a signature only means something to a validator if the certificate chains to a trust anchor it accepts. Signing with a test certificate produces a manifest that checkers report as untrusted. Getting onto the official trust list is a separate process from writing the code.

When c2patool is enough

If your goal is "what's in this file?", use the CLI instead of writing Rust. Per its README and usage docs:

c2patool photo.jpg trust --trust_anchors='https://raw.githubusercontent.com/c2pa-org/conformance-public/refs/heads/main/trust-list/C2PA-TRUST-LIST.pem'

Or run c2patool init trust once to cache the list locally so every later command checks against it. If the signer isn't on the list, the output includes a validation_status entry such as signingCredential.untrusted.

For a quick look without installing anything, the CAI's Verify website does the same kind of check in a browser.

What c2pa-rs can't tell you, and what our tools don't do

It can only read what's there. If a platform re-encoded the image or someone stripped its metadata, there's no manifest to find and c2pa-rs reports nothing. Absence isn't evidence of anything. Our post on which platforms strip metadata covers how common that is.

Valid doesn't mean true. A trusted manifest proves the record is intact and who signed it. It doesn't prove the scene was real or that the signer was honest. The C2PA standard explainer goes into those limits.

It doesn't see watermarks. Invisible watermarks such as SynthID live in the pixels, not in the manifest. A manifest may say a watermark was applied, but c2pa-rs doesn't detect one.

Our checker isn't a validator. The content credentials checker runs in your browser and scans the file for C2PA markers such as c2pa.claim and c2pa.signature. It tells you whether a manifest is present. It doesn't parse the manifest or verify the signature. For that, use c2patool or the library.

Our remover takes the manifest out, not the history. The C2PA remover redraws images on a canvas in your browser, which drops C2PA along with EXIF, XMP and IPTC, and nothing is uploaded. It accepts JPEG, PNG and WebP, and JPEG output is re-encoded at quality 0.95, so the pixels aren't bit-identical. It can't remove a watermark in the pixels or a copy of the manifest the creator stored online. A file without metadata also isn't anonymous: the platform still knows which account posted it.

For the bigger picture of what a manifest records and why it matters for privacy, start with the Content Credentials explainer.

Questions people ask

Is c2pa-rs the same as c2patool? No. c2pa-rs is the library. c2patool is a command-line program built on it, now kept in its own repository.

Who makes c2pa-rs? Adobe and other contributors created it as part of the Content Authenticity Initiative, which publishes it under the contentauth GitHub organisation.

Is c2pa-rs free for commercial use? It's dual-licensed under MIT and Apache 2.0. The README notes that some components and dependencies have their own terms, so check those for your build.

Is it production-ready? The project still calls itself beta and makes breaking changes on a roughly two-month cycle. Pin a version and expect to update code when you upgrade.

Can I use it from Python or JavaScript? Yes, through the CAI's bindings: c2pa-python, c2pa-js, plus C++, Swift and Android SDKs, all built on the Rust core.

Does c2pa-rs detect AI images? Only if the file carries a manifest saying so. It reads what the generator or editor recorded; it doesn't analyse pixels. See how to check if an image is AI-generated for other signals.