Hey all! Do we have canonical examples of ffi usa...
# libpact_ffi-users
y
Hey all! Do we have canonical examples of ffi usage for the lifecycle of • http v3 pact test • message v3 pact test • http v4 pact test • Message async v4 pact test • Message sync v4 pact test • Plug-in v4 pact test Can the FFI deal with creating and verifying v2 pacts as well? If so canonical examples would be great for that. Some examples around certain other lifecycles • logging • Error handling • Pact file writing There is some existing useful examples / docs, I used the PHP ones as my go to to replicate • canonical examples in c https://github.com/pact-foundation/pact-reference/tree/master/rust/pact_ffi/examples • Arch https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_ffi/ARCHITECTURE.md • PHP https://github.com/pact-foundation/pact-reference/tree/php_plugins/php/src • Python https://github.com/pact-foundation/pact-reference/tree/php_plugins/python • There are other Lang examples in that repo ( c / js / ruby ) I’ve been on a little journey learning about FFI / C interop over that last couple of months as a bit of a side thing, as I didn’t know enough about the low level workings of Pact! https://github.com/YOU54F/hello_ffi
u
Can the FFI deal with creating and verifying v2 pacts as well?
Yes, it should support all the spec versions as it just wraps Pact-Rust