Starlark-based build systems with the ability to compile a code generator and
invoke it as a genrule will run CXX's C++ code generator via its cxxbridge
command line interface.
The tool is packaged as the cxxbridge-cmd crate on crates.io or can be built
from the gen/cmd/ directory of the CXX GitHub repo.
The CXX repo maintains working Bazel BUILD and Buck BUCK targets for the
complete blobstore tutorial (chapter 3) for your reference, tested in CI. These
aren't meant to be directly what you use in your codebase, but serve as an
illustration of one possible working pattern.