On Mon, 6 Feb 2023 12:14:06 +0000 José Iván López González <jlopez@suse.de> wrote:
On 2/6/23 11:40, Imobach Gonzalez Sosa wrote:
Hi all, <snip>
Thanks for the summary! Very interesting, indeed. About deciding whether to continue with Rust or not, I would put several aspects on the balance:
* Do we gain any use cases? Probably yes. For example, if the CLI is able to run commands remotely, then we don't need ruby deps in the system.
Well, for me the best use case for CLI is having iguana that has only dinstaller backend container and static build rust CLI as the least memory consuming solution for something like RPi or where memory size matters. With ruby CLI it is a lot of dependencies which probably ends up in own container so much more space occupied.
* Is Rust a good option for other future migrations? Right now D-Installer uses a lot YaST logic, but we could start implementing new features in a separate Rust based backend.
Well, this really depends if we see the language as future. I for sure would not hesitate to write some dbus service in rust. Advantage is that it does not bring dependencies.
* In case of continuing with the Rust based CLI, more people in the team should start learning Rust. I think this is a positive thing, just commenting to make clear we don't want silos anymore.
Yeap, that is for sure and it is advantage of rust. It is popular language similar like ruby, so it is not problem to hire someone if needed to replace someone.
* Is there any other options to consider? Maybe we could do the exercise of implementing something similar with other modern language, for example Go, just to compare.
Well, let me compare it from my POV. Rust is for me good language for serious work where correctness matters ( I do not do any speed or memory comparison, but I expect rust to be a better or at least on par with ruby ). If I compare it to ruby I have to say, I get more often errors from compiler ( quite good one, with templating it is more challenging but definitively better then from templates in g++ ), but significantly less often resulting binary. So compiler catch for me quite lot issues I overlook or do not know in advance. So ruby is for me better with prototyping quickly, but for robust and less buggy result rust looks better for me. If I compare to C even with new standard rust is definitively more safe environment and easier to work with its memory model. If I compare to C++ I think that C++ can do with some libraries and new standard almost all what rust can do, but for me a big issue with C++ is its objects, which makes it hard to bind to other languages and swig is not answer for me. Also as smart pointers are not default, it is still possible to mess with memory. Comparison to go is the hardest for me, because I just touch go briefly and read just some intro to it. But overall I learn more quickly rust, but I have no direct goal for go program. And that reminds me one really nice advantage of rust for newcommers. Really great IDE support thats to LSP. I use vscode and I have to say that support is great. It shows all documentation, it shows all types even those dynamically interfered ( something like C++ auto ), debugger support and also formatter/hints why it does not build. So even if you are not familiar with method names it really smartly shows available ones including its documentation and parameters.
* Having a team that speaks Ruby, is Rust the best migration? If not, are there good reasons to pay the effort?
That is good question and sadly I do not know the best answer, but as said I think also ruby has its place. In ruby you can really quickly prototype what you want, do it on target system and play with it. With rust it is different purpose, but for me it is really good language if you have some POC that you want to transform to stable software. Overall I really enjoy this hackweek project and it was good experience. Josef
And for sure there are more things to consider. BTW, I am all for learning Rust. I am only expressing that officially migrating to another language is a difficult decision ;).
Thanks a lot Imo and Josef. Great work!
Regards,
Iván