is there by any chance any resources or tutorials ...
# pact-rust
p
is there by any chance any resources or tutorials available for a full implementation of pact with rust that anyone could point me to ? just asking before I invest some time navigating things myself. The docs do appear to be a bit outdated.
u
Are you asking about writing consumer tests and verifying providers in Rust?
p
yes
the documentation is very much out of date and the instructions in this read me doesn’t work https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_consumer/README.md the latest version i can see in
<http://docs.rs|docs.rs>
for the pact_consumer is 0.9.7
u
In what way don't they work? Did you get an error? The consumer crate is being used internally, you can see the tests here https://github.com/pact-foundation/pact-reference/blob/master/rust/pact_verifier/tests/tests.rs#L49 as well as with the plugin project, here https://github.com/pact-foundation/pact-plugins/blob/main/examples/csv/csv-consumer-rust/src/lib.rs#L51
p
the struct
ConsumerPactBuilder
does not exist anymore on that pact consumer version
also everything now has to be async. It appears that native support for building non sync pact is no longer available aswell ? or atleast will require some work around.
u
oh, yeah, good point
I'll update the documentation
p
how about non async pact builders. I can see it in previous pact consumer versions. Is there a conversation about why this was removed ? I don’t really want to use tokio.
u
Yes, we could have non-async ones. It is only if you need to use plugins that it needs to be async, because the plugins run as a separate process
p
will you also add support for non async ones in the same commit for updating the docs ? or do i need to make a feature request ?
u
I'll probably fix the builder to support non-async, then update the docs in the end as the changes may invalidate any docs that are there
p
okay. thanks. In the mean time i will just use the old builder.
do you need me to create an issue or anything ?
u
Yes, please. Otherwise this request could get lost (this slack only keeps 90 days of messages)
p
thanks for doing this btw even though i forgot to raise an issue
👍 1