JakWai01 / lurk

A pretty (simple) alternative to strace
Apache License 2.0
871 stars 28 forks source link

massive simplification, improve performance, license change proposal #16

Closed nyurik closed 1 year ago

nyurik commented 1 year ago

Hi, this is another huge set of refactorings - this time massively simplifying the code, removing tons of string cloning, using constants everywhere, etc etc etc - i have managed to remove several thousands (!!!) of lines. Fun times :)

I am not sure if you saw my comment elsewhere - please consider relaxing the licensing on this tool. AGPL is a bit weird on a tiny tool like this, and it will do much more harm than good in the long run. Note that almost all rust code is apache2+mit licensed. I have made all the needed changes as part of this PR, adding your name to the MIT license too. I added my name to the authors, i hope you are ok with that too. :)

My next plan, once the above is settled and merged is to clean up the printing, restructure the code to the modern standards, and many other pending things.

JakWai01 commented 1 year ago

Great PR! I am really loving the macro. This simplification makes supporting different architectures in the future way easier.

nyurik commented 1 year ago

Thx :) The macro was the simpler thing (without the macro you can still do it as oneliners, just that you have to write in the ("mmap", [ADDR, INT, INT, INT, None, None]), style. The main.rs involved far more changes with the code structure and removing all the String cloning and random complexities. Do take a look at those changes, as they are much more "rusty" than the original "c-like" code