c2pa-rs

A fork of https://github.com/contentauth/c2pa-rs/
git clone git://archive.git.mtrnord.blog/mtrnords-photography-manager/c2pa-rs.git
Log | Files | Refs | README

commit 46db40f6a703b0bedbf78fa0618448b9695fd3a1
parent 31460ce6e02d64d387e18d168390eb8387e567a3
Author: Rand McKinney <crandmck@yahoo.com>
Date:   Mon,  1 Aug 2022 09:44:44 -0700

(IGNORE) Clarify dependency requirements (#93)

* Update lib.rs

Add note about file_io dep.

* Update lib.rs

* Update README.md

* Update README.md

* Update README.md

* Update lib.rs

Tell the doc test engine to not run this line since its not Rust code.

* Update lib.rs

remove trailing space
Diffstat:
MREADME.md | 12+++++++++---
Msdk/src/lib.rs | 8++++++++
2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -49,17 +49,23 @@ Add this to your `Cargo.toml`: c2pa = "0.11.0" ``` +If you want to read or write a manifest file, add the `file_io` dependency to your `Cargo.toml`, for example: +``` +c2pa = {version="0.11.0", features=["file_io"]} +``` + +NOTE: If you are building for WASM. omit the `file_io` dependency. + ## Crate features The Rust SDK crate provides: * `async_signer` enables signing via asynchronous services which require `async` support. -* `bmff` enables handling of BMFF file formats. Currently only MP4, M4A, and MOV are enabled for writing. +* `bmff` enables handling of ISO base media file formats (BMFF) used for video. Currently only MP4, M4A, and MOV are enabled for writing. * `file_io` enables manifest generation, signing via OpenSSL, and embedding manifests in various file formats. * `serialize_thumbnails` includes binary thumbnail data in the [Serde](https://serde.rs/) serialization output. * `xmp_write` enables updating XMP on embed with the `dcterms:provenance` field. (Requires [xmp_toolkit](https://crates.io/crates/xmp_toolkit).) -* `no_interleaved_io` the SDK uses threaded I/O for some operations to improve performance. Using this feature will force fully synchronous I/O. - +* `no_interleaved_io` forces fully-synchronous I/O; Otherwise, the SDK uses threaded I/O for some operations to improve performance. ## License diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs @@ -20,6 +20,14 @@ //! This library supports reading, creating and embedding C2PA data //! with JPEG and PNG images. //! +//! To read or write a manifest file, you must add the `file_io` dependency to your Cargo.toml. +//! EXCEPTION: If you are building for WASM, do not add this dependency. +//! For example: +//! +//! ```text +//! c2pa = {version="0.11.0", features=["file_io"]} +//! ``` +//! //! # Example: Reading a ManifestStore //! //! ```