You can cut out the middle man and use https://github.com/marxarelli/masse, a CUE frontend for BuildKit.
However I don’t think anything using BuildKit is as fine grained as Bazel.
Dagger replaced BuildKit (a lot of reasons for this). The BuiltKit API sucks compared to Dagger's, so I personally prefer the middleman, but that is no longer the case. See: