Skip to content

Commit

Permalink
feat: Create placeholders for forthcoming crates (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
scouten-adobe authored Oct 24, 2024
1 parent aa9c17c commit 1381546
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,15 @@ jobs:
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Dry-run of crate publish
- name: Dry-run of crate publish (c2pa-rs)
run: cargo publish -p c2pa --dry-run

- name: Dry-run of crate publish (c2pa-crypto)
run: cargo publish -p c2pa-crypto --dry-run

- name: Dry-run of crate publish (cawg-identity)
run: cargo publish -p cawg-identity --dry-run

clippy_check:
name: Clippy
if: |
Expand Down Expand Up @@ -270,7 +276,7 @@ jobs:
# environment. The goal is to fail PR validation
# if the subsequent release would result in a failed
# documentation build on docs.rs.
run: cargo +nightly doc --all-features --no-deps
run: cargo +nightly doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: --cfg docsrs
DOCS_RS: 1
Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[workspace]
resolver = "2"
members = ["sdk", "export_schema", "make_test_images"]
members = [
"cawg_identity",
"crypto",
"export_schema",
"make_test_images",
"sdk",
]
23 changes: 23 additions & 0 deletions cawg_identity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "cawg-identity"
version = "0.1.0"
description = "Implementation of CAWG identity assertion specification"
authors = [
"Eric Scouten <scouten@adobe.com>",
]
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/c2pa-crypto"
homepage = "https://creator-assertions.github.io/identity/"
repository = "https://github.com/contentauth/c2pa-rs"
readme = "README.md"
keywords = ["identity"]
categories = ["api-bindings"]
edition = "2021"
rust-version = "1.76.0"
exclude = ["tests/fixtures"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
5 changes: 5 additions & 0 deletions cawg_identity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Implementation of CAWG identity assertion specification

[![CI](https://github.com/contentauth/c2pa-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/contentauth/c2pa-rs/actions/workflows/ci.yml) [![Latest Version](https://img.shields.io/crates/v/cawg-identity.svg)](https://crates.io/crates/cawg-identity) [![docs.rs](https://img.shields.io/docsrs/cawg-identity)](https://docs.rs/cawg-identity/) [![codecov](https://codecov.io/gh/contentauth/c2pa-rs/branch/main/graph/badge.svg?token=YVHWI19EGN)](https://codecov.io/gh/contentauth/c2pa-rs)

This is a placeholder crate and not yet intended to be used directly. This will become an implementation of the core of the [Creator Assertions Working Group identity assertion draft specification](https://creator-assertions.github.io/identity/).
10 changes: 10 additions & 0 deletions cawg_identity/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// This crate is a placeholder. More to come soon ...
pub fn does_nothing_yet() {}

#[cfg(test)]
mod tests {
#[test]
fn it_does_nothing() {
println!("Placeholder");
}
}
28 changes: 28 additions & 0 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "c2pa-crypto"
version = "0.1.0"
description = "Cryptography internals for c2pa-rs crate"
authors = [
"Maurice Fisher <mfisher@adobe.com>",
"Gavin Peacock <gpeacock@adobe.com>",
"Eric Scouten <scouten@adobe.com>",
"Leonard Rosenthol <lrosenth@adobe.com>",
"Dave Kozma <dkozma@adobe.com>",
"Dylan Ross <dyross@adobe.com>"
]
license = "MIT OR Apache-2.0"
documentation = "https://docs.rs/c2pa-crypto"
homepage = "https://contentauthenticity.org"
repository = "https://github.com/contentauth/c2pa-rs"
readme = "README.md"
keywords = ["metadata"]
categories = ["api-bindings"]
edition = "2021"
rust-version = "1.76.0"
exclude = ["tests/fixtures"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
5 changes: 5 additions & 0 deletions crypto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# C2PA cryptography implementation

[![CI](https://github.com/scouten-adobe/TEMP-c2pa-crypto/actions/workflows/ci.yml/badge.svg)](https://github.com/scouten-adobe/TEMP-c2pa-crypto/actions/workflows/ci.yml) [![Latest Version](https://img.shields.io/crates/v/c2pa-crypto.svg)](https://crates.io/crates/c2pa-crypto) [![docs.rs](https://img.shields.io/docsrs/c2pa-crypto)](https://docs.rs/c2pa-crypto/) [![codecov](https://codecov.io/github/scouten-adobe/TEMP-c2pa-crypto/graph/badge.svg?token=NxwUjwv0j5)](https://codecov.io/github/scouten-adobe/TEMP-c2pa-crypto)

This is a placeholder crate and not yet intended to be used directly. We anticipate moving some of the cryptography internal implementation from the existing c2pa-rs crate into this crate.
10 changes: 10 additions & 0 deletions crypto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// This crate is a placeholder. More to come soon ...
pub fn does_nothing_yet() {}

#[cfg(test)]
mod tests {
#[test]
fn it_does_nothing() {
println!("Placeholder");
}
}
6 changes: 6 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ changelog_path = "./CHANGELOG.md"
# we will leave the changelog in the repo root instead
# of in the `sdk` folder (which would be the default).

[[package]]
name = "c2pa-crypto"

[[package]]
name = "cawg-identity"

[[package]]
name = "export_schema"
publish = false
Expand Down

0 comments on commit 1381546

Please sign in to comment.