pdftract/crates/pdftract-libpdftract/src/lib.rs
jedarden 9c7f9d3e37 test(pdftract-5ya9x): update memory roundtrip test to 10,000 iterations
- Updated test_api_null.c to run 10,000 alloc/free cycles (was 100)
- Updated verification note to mark memory roundtrip as PASS
- Improved stream_next implementation to use reference-based approach
  instead of Box::from_raw/leak dance for cleaner memory handling

All acceptance criteria for pdftract-5ya9x now PASS:
- 12 exported symbols verified via nm -D
- C client tests (test_api.c, test_api_null.c)
- C++ client test (test_extract.cpp)
- Null pointer safety
- Panic safety (catch_unwind on all entry points)
- Memory roundtrip (10,000 iterations)
- Thread safety (8 pthreads)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-23 08:13:31 -04:00

16 lines
663 B
Rust

//! pdftract-libpdftract — C/C++ FFI library for pdftract.
//!
//! This crate provides the extern "C" API surface for C/C++ integrations.
//! It compiles to both shared (cdylib) and static (staticlib) libraries,
//! allowing downstream projects to link dynamically or statically.
//!
//! ## Output artifacts
//!
//! - Linux: `target/debug/libpdftract.so` (shared), `target/debug/libpdftract.a` (static)
//! - macOS: `target/debug/libpdftract.dylib` (shared), `target/debug/libpdftract.a` (static)
//! - Windows: `target/debug/pdftract.dll` (shared), `target/debug/pdftract.lib` (static)
pub mod api;
// Re-export the FFI API at the crate root
pub use api::*;