npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

c2pa-warc

v0.2.1

Published

C2PA manifest embedding for WARC web archive files (ISO 28500)

Downloads

310

Readme

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