Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
# Start from clean env: Delete `.venv`, then `python3 -m venv .venv`
# Pre-requisite: Python virtual environment is active (source .venv/bin/activate)

release:
cargo build --release

build-python:
rm -rf c2pa/c2pa
python3 -m pip uninstall -y maturin
python3 -m pip uninstall -y uniffi
python3 -m pip install -r requirements.txt
maturin develop
maturin develop
4 changes: 2 additions & 2 deletions c2pa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@

from .c2pa_api import Reader, Builder, create_signer, create_remote_signer, sign_ps256
from .c2pa import Error, SigningAlg, CallbackSigner, sdk_version, version
from .c2pa.c2pa import _UniffiConverterTypeSigningAlg, _UniffiRustBuffer
from .c2pa.c2pa import _UniffiConverterTypeSigningAlg, _UniffiConverterTypeReader, _UniffiRustBuffer

__all__ = ['Reader', 'Builder', 'CallbackSigner', 'create_signer', 'sign_ps256', 'Error', 'SigningAlg', 'sdk_version', 'version', 'create_remote_signer', '_UniffiConverterTypeSigningAlg', '_UniffiRustBuffer']
__all__ = ['Reader', 'Builder', 'CallbackSigner', 'create_signer', 'sign_ps256', 'Error', 'SigningAlg', 'sdk_version', 'version', 'create_remote_signer', '_UniffiConverterTypeSigningAlg', '_UniffiRustBuffer', '_UniffiConverterTypeReader']
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ impl Reader {
Err(Error::RwLock)
}
}

pub fn get_raw_reader(&self) -> &RwLock<c2pa::Reader>{
&self.reader
}
}

pub struct Builder {
Expand Down