Skip to main content

crates.io docs.rs CI OpenSSF Scorecard License

Overview

Stores and retrieves C2PA Manifest Stores in WARC 1.1 files (ISO 28500). The manifest is stored as a WARC record of a dedicated c2paprovenance type with Content-Type: application/c2pa, as the last record in the file.

WARC is used by national libraries, legal deposit systems, and digital preservation institutions to archive web content. This crate enables content provenance for archived web resources.

The C2PA Technical Specification defines no WARC embedding method. Unlike HTML, structured text, ZIP, ONNX, or SafeTensors — each of which has a normative clause — WARC embedding is a proposal, and what this crate implements is that proposed shape. It conforms to WARC 1.1 and produces a valid archive readable by any WARC tool; it does not claim C2PA specification conformance, because there is nothing yet to conform to.

Zero dependencies.

Quick Start

[dependencies]
c2pa-warc = "0.1"

Append a manifest

use c2pa_warc::append_manifest;

let warc_data: &[u8] = /* existing WARC file bytes */;
let manifest: &[u8] = /* C2PA manifest store bytes */;
let signed = append_manifest(warc_data, manifest, "urn:uuid:12345678-1234-1234-1234-123456789012").unwrap();

Read a manifest

use c2pa_warc::read_manifest;

let manifest = read_manifest(&warc_data).unwrap();

Multiple manifests

A WARC file carries at most one manifest record, always last. An update removes the existing manifest record and appends the replacement, which leaves the bytes of every other record unchanged. When WARC files are concatenated, the combining tool appends a fresh manifest covering all records in the combined file and removes the constituent manifest records, which may be referenced as ingredients.

Example

cargo run --example make_sample_warc writes a minimal WARC (examples/sample.warc) containing a warcinfo record, one captured response record, and a trailing c2paprovenance record whose block is a real C2PA Manifest Store, then extracts it back to examples/sample.manifest.c2pa. The manifest record header:

WARC/1.1
WARC-Type: c2paprovenance
WARC-Record-ID: <urn:uuid:...>
WARC-Date: ...
Content-Type: application/c2pa
Content-Length: 3576

Design

  • Manifest stored as a WARC record of a dedicated c2paprovenance type, as the last record in the file; it carries no WARC-Target-URI
  • At most one manifest record; an update removes the existing one and appends the replacement
  • Manifest records are identified by WARC-Type: c2paprovenance together with Content-Type: application/c2pa

Scope

This crate implements embedding and extraction only. Content binding — the C2PA collection data hash, computed over each record's uncompressed bytes — is out of scope; use the official C2PA SDK to build and sign manifests.

Related Crates

Part of a family of single-purpose crates, one per C2PA embedding method. Each is standalone and independently versioned.

Crate Description
c2pa-structured-text Structured text: ASCII-armoured manifest in a comment or front matter
c2pa-unstructured-text Unstructured text: invisible Unicode variation-selector run
c2pa-html HTML: script and link elements in the document head
c2pa-http HTTP: the c2pa-manifest Link header, with a Tower middleware
c2pa-text-binding Soft binding and content fingerprinting for text assets
c2pa-vtt WebVTT caption and subtitle embedding
c2pa-zip ZIP-based documents: EPUB, DOCX, ODT, OXPS
c2pa-fonts OpenType/TrueType (SFNT) font embedding
c2pa-ml ML model containers: GGUF, SafeTensors, ONNX
c2pa Official C2PA SDK

Security

Found a vulnerability? Please report it privately — see SECURITY.md.

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

Built by WritersLogic

Metadata

Release files for c2pa-warc 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for c2pa-warc 0.2.1
File Size Uploaded
c2pa_warc-0.2.1.tar.gz 26.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for c2pa-warc 0.2.1
File
c2pa_warc-0.2.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
c2pa_warc-0.2.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
c2pa_warc-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.1 MB

Release files / c2pa_warc-0.2.1.tar.gz

Download URL c2pa_warc-0.2.1.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e64116c6b6f3f2723166951b0611b985b67c09d18500112611a3e46fec4577b8
BLAKE2b-256 checksum
How to use checksums
86811e9a9e4c9e3189b3bdb6b8f8321c9c00e31572938e613590e9c534ef7289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / c2pa_warc-0.2.1-cp39-abi3-win_amd64.whl

Download URL c2pa_warc-0.2.1-cp39-abi3-win_amd64.whl
Size 122.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
08db1b270f3d790a0223811000000c0e2d7213d4d5628afe7791ac466df9216e
BLAKE2b-256 checksum
How to use checksums
e8ad58f00a504362e53a04e244a844b129a7dc7add227a7f12918b342ed96da7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 260.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d7a7cb117860681abe1ac9aac51d123b2ef3a364b719bf329d9cd7058cb2de35
BLAKE2b-256 checksum
How to use checksums
6fb28ac23b6fd2407a1a81a8bfcc41c54d29a6fd3dd3b008c564fd64179aa58b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL c2pa_warc-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 255.3 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b517a0461cae60098fca55c0163db6bf901a7902753249504c32d31f84e7fa70
BLAKE2b-256 checksum
How to use checksums
fe875f97105935b69d780bb526998a7b9ca1499b07569b054651a1c0271c3039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / c2pa_warc-0.2.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL c2pa_warc-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 225.5 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3b5b5c527ccc00d4644d129c83b64386d4f17e4cbd665fef40a40fcd00137e99
BLAKE2b-256 checksum
How to use checksums
7bc0d140664b1d7867b9f15b17bb0907629a431d2dfc2b0e2f136ec8390b37c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release files / c2pa_warc-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL c2pa_warc-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 227.4 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7b9ddc1dad04de0afb4936f9c64f63302498929396579bda39793ec9d3dbf310
BLAKE2b-256 checksum
How to use checksums
711baab069c0310d39fbeacf7beed2da0969eb1255ae39f92d9480dfa9d1ebf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

6 release files

0.2.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page