Cxx for header only library

Hello! I have a problem. I'm trying to write a library that is primarily in rust, but exposes a c++ ffi. I've tried to use cbindgen, but it doesn't appear to work with opaque types. The documentation seems to imply that forward declarations of such opaque types happen automatically, but this doesn't appear to be the case. So I'm trying to migrate to cxx instead, but cxx seams to want to build the rust and c++ program, which is not what I want. I simply want it to generate a header only library that calls into the real code (which is all rust). This rust library would later be built by some c++ environment (namely qt in my case). Is there a way to do this, or should I use a different method?