Mainly around writing a consumer facing DSL which exposes the mock server capabilities (consumer side testing) and provider verifier capabilities (provider side testing)
Then mapping these dsl’s to the native ffi functions.
There is some lifecycle handling to consider, it usually best to look at the one of the implementations that wraps the FFI (pact-js-core / pact-net / pact-php v10 alpha) and having a look at the
https://github.com/pact-foundation/pact-compatibility-suite which can be used to verify a client languages parity at implementing the pact feature set.
It’s written in cucumber (the compat suite) and
@Jo Laing knows the maintainer of the perl cucumber implementation aswell