mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
.. | ||
cachedir | ||
clang2il_test.go | ||
clang2il.go | ||
clangexec.go | ||
emitcabi.go | ||
emitgo.go | ||
exceptions.go | ||
intermediate.go | ||
main.go | ||
README.md | ||
transformchildclasses.go | ||
transformoptional.go | ||
transformoverload.go | ||
util.go |
genbindings
The genbindings
program regenerates the qt bindings.
Archicture design
Bindings are generated as follows:
- Scan input directory for header files.
- For each header file:
- Run
clang --ast-dump=json
to get a JSON ast.- This is somewhat slow, the results will be cached in
./cachedir
after the first run.
- This is somewhat slow, the results will be cached in
- Convert Clang AST to our own intermediate representation.
- Emit CABI cpp/h pair.
- The CABI is a projection of Qt into plain C. The translation unit itself is C++, but the header can be used as extern c.
- Emit Go binding file.
Configuration
It's tested to work on with Debian 12 / Qt 5.15 / Clang 14 / GCC 12.
You should check the following configuration:
- Input directories containing Qt headers
- All of
exceptions.go