Invoking cargo sqlx prepare from build script

Hi guys,

i am facing the deadlock issue in build.rs i suppose.
I am trying to generate offline sqlx-data.json and db file automatically when i rebuild the project, it could be useful for users to have this kind of automatism in case we change sql file and so they do not need to manually recreate the files.

But as soon as I invoke from build.rs the cargo sqlx prepare i am stuck in the deadlock having build.rs unable to build.

I know that some crates have a build-dependencies that support this kind of use...

Any advice on this?

Thanks in advance...