Repository navigation
DO NOT MERGE: Build against c2pa-rs main (nightly) - #270
Draft
scouten-adobe wants to merge 3 commits into
Draft
scouten-adobe wants to merge 3 commits into
scouten-adobe wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace deleted constructors and settings APIs, adapt opaque streams, and migrate embeddable signing to context signers. Fix source-build artifacts and Windows toolchain setup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE — c2pa-rs main compatibility probe
Build c2pa-c-ffi from source from
contentauth/c2pa-rsmainto detect incompatibilities ahead of the mid-November breaking-changes release. This remains a draft / DO NOT MERGE experiment.CI logs the actual Rust commit and toolchain versions. The redundant initial prebuilt-binary configure step has been removed; the existing Makefile configures source builds for debug and sanitizer tests.
Latest compatibility check (2026-10-16)
Checked against contentauth/c2pa-rs commit
60f7cbdc69ab7a2554fcc87eb4df77050814b2cf(0.92.0-dev), confirmed to bemainat the time of the check. Local platform: macOS arm64, AppleClang 21, Cargo 1.98.1.Original result: incompatible. The Rust release library built, but deleted APIs and opaque stream handles prevented C/C++ compilation. Commit
c1a0855addresses those failures, and the complete platform CI matrix now passes.API migration
User-directed choice: migrate to supported APIs and remove obsolete methods rather than add a compatibility layer.
C2paStreamc2pa_load_settingsc2pa::load_settings; use explicit Context settings instead. Migrated settings-dependent tests and documentation.with_definition,with_archive, andwith_stream.Builder::data_hashed_placeholderandBuilder::sign_data_hashed_embeddable. Use a Context signer,placeholder,set_data_hash_exclusions,update_hash_from_stream, andsign_embeddable. The old external precomputed DataHash JSON argument has no drop-in replacement.c2pa_format_embeddableBuilder::format_embeddableusingc2pa_builder_compose_manifest.c2pa_signature_freec2pa_free.The embeddable tests now embed actual JPEG/PNG placeholders, compute exclusions and hashes, patch the exact-size final manifest, and verify readback. JPEG coverage includes replacement of existing JUMBF, metadata preservation, raw-manifest formatting, and detection of tampering outside exclusions. BoxHash coverage remains.
Also fixed source-build infrastructure: declare/copy generated headers and Windows import libraries, link the C test to the proper import library, initialize MSVC for both Windows architectures, and avoid a prebuilt-only diagnostic test for source builds.
Compatibility notes
This intentionally changes the public C++ API:
load_settingsand the two old data-hashed signing methods are removed. Context-free constructors no longer read thread-local settings. Pass explicit Context objects for non-default configuration. Stream wrappers no longer inherit from the C ABI stream type; use their existingc_streammember.Validation
0.91.0dependency: library, tests, and examples still compile.c1a0855: Windows x64/arm64, macOS arm64/Intel, Ubuntu latest and 22.04 x64, and Ubuntu 22.04/24.04 arm64. Debug suites pass everywhere; sanitizer suites pass on Linux and macOS (skipped on Windows by the existing workflow).Local reproduction
Earlier failed CI runs predate the migration fixes.