Dune build -w also run bin on change

I have a dune project with


lib-{a, b, c} are dune ‘libraries’.
bin-gen contains code that auto generates compatible OCaml ↔ Rust bindings;

I want it so that anytime anything in src/bin-gen/ changes, the existing dune build -w will rebuild src/bin-gen and then execute the Main function.

Is there a way to do this via dune ?


Try dune exec -w project_name