Markus Armbruster <[email protected]> writes:

> I applied, ran make, and it didn't create qapi-types.rs and
> test-qapi-types.rs for me.  What am I missing?

Looks like I have to run with -B qapi.backend.QAPIRsBackend.

-B is meant for out-of-tree backends.  Commit dde279925c9 explains:

    qapi: pluggable backend code generators
    
    The 'qapi.backend.QAPIBackend' class defines an API contract for code
    generators. The current generator is put into a new class
    'qapi.backend.QAPICBackend' and made to be the default impl.
    
    A custom generator can be requested using the '-k' arg which takes a
    fully qualified python class name
    
       qapi-gen.py -B the.python.module.QAPIMyBackend
    
    This allows out of tree code to use the QAPI generator infrastructure
    to create new language bindings for QAPI schemas. This has the caveat
    that the QAPI generator APIs are not guaranteed stable, so consumers
    of this feature may have to update their code to be compatible with
    future QEMU releases.

Using it for the in-tree Rust backend is fine for a prototype.
Mentioning it in a commit message or the cover letter would've saved me
some digging.


Reply via email to