digitalmars.D.announce - (Oh My) Gentool 0.4.0 released
- evilrat (13/13) Jun 06 2021 ## (oh my) gentool v0.4 is now out.
- sighoya (4/17) Jun 06 2021 +1
- evilrat (11/33) Jun 06 2021 Yes, it's all clang under the hood.
- Andrea Fontana (2/15) Jun 07 2021 Nice work. Is there a docker somewhere in order to test it?
- evilrat (8/28) Jun 07 2021 It's got a dockerfile few days back, though I haven't tried it
- evilrat (7/29) Jun 08 2021 Added image to dockerhub
- Imperatorn (2/15) Jun 07 2021 Splendid work, keep it up
It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0
Jun 06 2021
On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0+1 How did you parse C++ code which seems overkill to do alone. Did you enact clang for?
Jun 06 2021
On Sunday, 6 June 2021 at 10:38:22 UTC, sighoya wrote:On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:Yes, it's all clang under the hood. But it's not just clang tooling that uses pre-made Tool class that has to be invoked as part of clang itself using special flag. Instead it creates compiler instance and runs regular compilation pass in memory extracting declarations recursively (as part of older pipeline, can be done to some extent using C API with cursors), and then it converts C++ AST to D source code with minimal AST manipulation (can't be done with C API), though I'm looking into AST-to-AST translation instead and then using D compiler frontend to emit source code for better result.It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0+1 How did you parse C++ code which seems overkill to do alone. Did you enact clang for?
Jun 06 2021
On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0Nice work. Is there a docker somewhere in order to test it?
Jun 07 2021
On Monday, 7 June 2021 at 09:45:53 UTC, Andrea Fontana wrote:On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:It's got a dockerfile few days back, though I haven't tried it myself yet. (SSH port at end is for IDE's) https://github.com/Superbelko/ohmygentool/blob/master/Dockerfile.local-dev It detects standard library includes automatically, but if you're going to cross compile you'll have to tell it where to look, also probably need to pass proper target triple.It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0Nice work. Is there a docker somewhere in order to test it?
Jun 07 2021
On Monday, 7 June 2021 at 10:15:28 UTC, evilrat wrote:On Monday, 7 June 2021 at 09:45:53 UTC, Andrea Fontana wrote:Added image to dockerhub https://hub.docker.com/r/superbelko/gentool Get it using `docker pull superbelko/gentool` How to use https://github.com/Superbelko/ohmygentool/wiki/DockerOn Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0Nice work. Is there a docker somewhere in order to test it?
Jun 08 2021
On Sunday, 6 June 2021 at 10:03:11 UTC, evilrat wrote:It is my fancy tool to generate extern(C++) stuff quicker, it takes regular compiler flags that you usually pass to clang and translates C/C++ code to D. This release has one new feature: support pragma mangle on aggregates (class, struct, etc...). Also a lot of work was put into template support, but it is still has lots of unhandled cases, so do not expect it will translate STL or Boost without need of manual fixes. Source https://github.com/Superbelko/ohmygentool Windows binaries https://github.com/Superbelko/ohmygentool/releases/tag/v0.4.0Splendid work, keep it up
Jun 07 2021