reasampler_pure_library(package_format SOURCES package_format.cpp)
reasampler_test(package_format LINK package_format)

reasampler_pure_library(package_manifest
    SOURCES package_manifest.cpp
    LINK PUBLIC bank_model slot_map PRIVATE package_format json)
reasampler_test(package_manifest LINK package_manifest)

reasampler_pure_library(export_plan
    SOURCES export_plan.cpp
    LINK PUBLIC package_manifest PRIVATE package_format)
reasampler_test(export_plan LINK export_plan package_format)

# bytes.h is header-only (see src/core/wire/CLAUDE.md) — no wire link edge needed.
reasampler_pure_library(bank_package
    SOURCES bank_package.cpp
    LINK PUBLIC package_format package_manifest PRIVATE app_version)
# app_version: the tests pin the stamped writer semver against stampVersion().
reasampler_test(bank_package LINK bank_package app_version)

# The frozen compatibility corpus, decoded rather than regenerated. Fixture path: see
# tests/package_fixtures.h.
reasampler_test(package_compat LINK bank_package)
target_compile_definitions(package_compat_tests PRIVATE
    REASAMPLER_PACKAGE_FIXTURE_DIR="${REASAMPLER_PACKAGE_FIXTURE_DIR}")

reasampler_pure_library(import_plan
    SOURCES import_plan.cpp
    LINK PUBLIC package_manifest bank_book origin_ledger PRIVATE package_format capture_paths)
# tracking_authority: the ledger-gate test proves the import does NOT share prune's
# composite blocker, which needs the composite to compare against.
reasampler_test(import_plan LINK import_plan tracking_authority)
