Re: (Oh My) Gentool 0.3.0 released
On Wednesday, 5 May 2021 at 11:51:27 UTC, evilrat wrote: On Wednesday, 5 May 2021 at 10:35:23 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 5 May 2021 at 10:01:13 UTC, user1234 wrote: ... To answer both: clang has lots of templates, sometimes not so trivial ones, its code base filled with C++ constructs that does not have nice one to one translation(or simply a C++ specific detail like alignment), and the most annoying part - it has various 'tables' generated as a build step that is a mix of external tools and macros. Basically every template will need some care, likely it will be easier to just emit C++ stubs that will force compiler to emit actual code to link with than trying to translate them. So no, not currently possible. Definitely not an unpaid job, well I'll still reject it even if it is paid one. Maybe some time in future, but for now there is a lot more priority stuff to do before even attempting this. Thanks for the explanations. BTW I had the same question for LDC backend being c++, I guess the answer would be similar.
Re: (Oh My) Gentool 0.3.0 released
On Wednesday, 5 May 2021 at 10:35:23 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 5 May 2021 at 10:01:13 UTC, user1234 wrote: I have a technical question about the tool itself. It is mostly written in cpp. Oh dear! Isn't it possible to use it to translate itself into D? To answer both: clang has lots of templates, sometimes not so trivial ones, its code base filled with C++ constructs that does not have nice one to one translation(or simply a C++ specific detail like alignment), and the most annoying part - it has various 'tables' generated as a build step that is a mix of external tools and macros. Basically every template will need some care, likely it will be easier to just emit C++ stubs that will force compiler to emit actual code to link with than trying to translate them. So no, not currently possible. Definitely not an unpaid job, well I'll still reject it even if it is paid one. Maybe some time in future, but for now there is a lot more priority stuff to do before even attempting this.
Re: (Oh My) Gentool 0.3.0 released
On Wednesday, 5 May 2021 at 10:01:13 UTC, user1234 wrote: I have a technical question about the tool itself. It is mostly written in cpp. Oh dear! Isn't it possible to use it to translate itself into D?
Re: (Oh My) Gentool 0.3.0 released
On Wednesday, 5 May 2021 at 06:50:29 UTC, evilrat wrote: (Oh My) Gentool - Yet another C/C++ binding generator. It is a tool to convert C/C++ code to D usable form. It takes JSON config, basically all C++ compiler flags and switches, and outputs extern(C++) declarations, (hopefully) in usable form D! ... Source https://github.com/Superbelko/ohmygentool ... I have a technical question about the tool itself. It is mostly written in cpp. Is it possible to use libclang and more generally LLVM c++ api [directly in D](https://dlang.org/spec/cpp_interface.html) or the Cpp interface is too limited ? Was this an option, have you tried ?