EVerest / everest-framework

Apache License 2.0
21 stars 19 forks source link

Rust code generation #125

Closed dorezyuk closed 1 year ago

dorezyuk commented 1 year ago

Rust code-generation support.

Co-authored-by: Holger Rapp hra@qwello.eu

a-w50 commented 1 year ago

Hi, right now, we still have the code generation in everest-utils, and we're planning to split it up between everest-framework and everest-core. The idea was, that the part of the code generation, which needs to understand the schema definitions, will belong to everest-framework and the part which provides the language specific "frontend" will belong to everest-core. As your implementation is only rust specific, this should PR should go into everest-core and not everest-framework.

dorezyuk commented 1 year ago

Hi, right now, we still have the code generation in everest-utils, and we're planning to split it up between everest-framework and everest-core. The idea was, that the part of the code generation, which needs to understand the schema definitions, will belong to everest-framework and the part which provides the language specific "frontend" will belong to everest-core. As your implementation is only rust specific, this should PR should go into everest-core and not everest-framework.

Is there some documentation where I can read up on this?

a-w50 commented 1 year ago

No, there is no documentation for that. You can have a look at the branch feature/ev-cli_refactor in everest-core. The code-generator script is inside scripts/code-generator. There are two sub-folders

SirVer commented 1 year ago

I think we have a couple of ways forward here:

  1. Merge this code gen as is and later converge it towards the new design you are proposing, @a-w50.
  2. Do not merge this code gen and try to guess the final design and converge it before merging.

I am very strongly in favor of 1, mostly because we want to build a product on this code and are pressed for time. I also do not agree that code-gen should be split between core and framework, I think it belongs in framework like proposed here. How are such design decisions figured out in the everest project?

SirVer commented 1 year ago

@dorezyuk Please make the MR description more detailed. also add co-author(s), at least me contributed. The MR description will become the squashed commit description.

SirVer commented 1 year ago

@a-w50 My understanding is that you changed something on the branch, but I do not see it. And it might have have been pushed over during a rebase of @dorezyuk (if so, sorry for that). I discussed with @caller and we decided to merge for now, let's discuss further refactorings in the tuesday call.

For the moment we also branched into https://github.com/qwello core and framework for now and will do further development there for higher development speed. I shortly discussed these topics with @caller, but we need to further discuss how collaboration can be done with less friction going forward.