Mudlet icon indicating copy to clipboard operation
Mudlet copied to clipboard

Split Mudlet up into `libmudlet` and a Qt front-end

Open vadi2 opened this issue 5 months ago • 26 comments

Description of requested feature:

Mudlet is a Qt Widgets based application, which works great for Linux/macOS/Windows, but not so great for running natively on Android or iPhone, which are popular feature requests.

Akin to how VLC is split into libVLC and various front-ends, split Mudlet out into libmudlet (providing all of core functionality) and a Qt Widget frontend that makes use of all of the core functionality.

Prior to taking this issue up, open a new github issue here and in there, provide (1) plan for how the library/frontend split will work on an architectural level, and (2) a plan for the migration strategy, since once mega PR will not work for this.

Reasons for adding feature:

  1. allowing Mudlet to eventually have a mobile-native version

Expected result of feature

libmudlet may use Qt Core classes (QObject, QTimer, QThread, QSettings, etc.) but must not depend on Qt Widgets, Qt GUI, or any UI-related Qt modules.

Mudlet's functionality pre and post-split should be 100% the same, nothing should be lost in the transition:

  • All existing automated tests must pass, plus:
  • All menu items and dialogs function identically
  • All Lua API functions return identical results
  • All protocol features work (GMCP, MXP, etc.)
  • All file formats (profiles, packages) remain compatible

Performance of the network/text display stack as well as the trigger engine should be comparable as well (no more than 10% lost). Measured in:

  • Text display: X lines/second in main console (can be measured using stressinator)
  • Network: Y MB/s processing throughput (needs to be measured)
  • Memory: no more than 10% increase in base memory usage

vadi2 avatar Aug 15 '25 12:08 vadi2

/attempt #8030

Pranith124 avatar Aug 17 '25 12:08 Pranith124

@Pranith124 make sure to provide (1) plan for how the library/frontend split will work on an architectural level, and (2) a plan for the migration strategy, since once mega PR will not work for this.

vadi2 avatar Aug 17 '25 12:08 vadi2

Sure @vadi2, I’ll work on the plan and share it with you as soon as possible.

Pranith124 avatar Aug 17 '25 12:08 Pranith124

/attempt #8030

MAVRICK-1 avatar Aug 17 '25 12:08 MAVRICK-1

Mudlet libmudlet Architecture Split

edit: Kebap: Moved contents into #8050

MAVRICK-1 avatar Aug 17 '25 14:08 MAVRICK-1

@vadi2 my plan

MAVRICK-1 avatar Aug 17 '25 14:08 MAVRICK-1

Thanks! We will review it as we have time. We're volunteers working on this project so it might take a bit to do this.

vadi2 avatar Aug 17 '25 14:08 vadi2

Sorry to come in late, but we need to move all volunteer's plans into issues of their own, so they can receive proper feedback, and not get mixed with other volunteers in this issue here.

I have appended info to the original bounty description above, and I have moved your proposal @MAVRICK-1 into an issue of its own. Again sorry for any inconvenience and let's continue there.

Kebap avatar Aug 17 '25 16:08 Kebap

Mudlet is a open source free program made by enthusiasts as a hobby. The bounty system (with funds donated by volunteers) is a way to provide a slight nudge in the direction the leadership wants to take or to attract those with the skills who want to work on something different for a change. It is not meant to provide a living wage.

ZookaOnGit avatar Aug 19 '25 11:08 ZookaOnGit

Thanks for letting us know your opinion loud and clear. Feel free to move on.

vadi2 avatar Aug 19 '25 11:08 vadi2

Thanks, but the plan has so little detail that it has no value. I've already prototyped approaches using dependency injection and separately Qt's slot mechanism to see how the architecture could work, including how a migration could be seamless for both approaches. We're past the "make module and move things into it one by one" stage and are looking for serious proposals that we can evaluate.

While the one plan we have is very verbose (not a good thing), it at least makes an effort to be practical and something that can be judged.

AI can be used in any role - trust me even people can put out large amounts of text.

As you mentioned, this isn't worth your time, so thanks for stating your opinion and feel free to move on.

vadi2 avatar Aug 19 '25 11:08 vadi2

Is anyone working on this as of now? If not, is it still open for contributions then?

sidd190 avatar Sep 13 '25 08:09 sidd190

Still open, we have one plan submitted so far on how it could be done. If you have one as well, let us know.

vadi2 avatar Sep 13 '25 08:09 vadi2

Yes I'm working on it, I'll post it asap with my understanding of the architecture and potential migration plan. I should do so in a new issue, right?

sidd190 avatar Sep 13 '25 10:09 sidd190

yo, I just opened the issue and tried to explain the plan and architecture for the switch, kindly review it, whether it is any good.

sidd190 avatar Sep 13 '25 13:09 sidd190

Yes @tommillan117 - It is open. Want to add your plan?

Kebap avatar Oct 08 '25 07:10 Kebap

The only request is that it's not an LLM-generated strategy. We can do those ourselves just as well, that's the easy part! I'd like to see it be relatable to the real-world.

Thanks everyone.

vadi2 avatar Oct 08 '25 07:10 vadi2

Sorry, please ask your questions here.

Kebap avatar Oct 09 '25 07:10 Kebap

Hey @tommillan117,

  1. That's right, two parts and the core should be adaptable to new GUIs - like Android or iOS.
  2. This is a large change that will not be wise to do in 1 PR, as the testing scope of that would be insurmountably large. Thus, we need a way we can break the migration down into smaller PRs that are testable, which we can merge into development branch and still have that branch continue to function normally mid-migration.
  3. Unfortunately, only Paypal or credit cards are supported.

vadi2 avatar Oct 09 '25 11:10 vadi2

@tommillan117

Does your payment have to be made through this site? Since I’m not located in one of the supported countries, would that make it impossible for me to receive the bounty? Is it impossible to pay directly with cryptocurrency?

Curious, whereabouts in the World are you? We do have contributors from a wide range of places and we are keen to hear from more. Even if you don't feel able to work on this BIG thing we are always looking to increase the number of languages/locales that Mudlet supports...

SlySven avatar Oct 09 '25 19:10 SlySven

Hey @tommillan117,

Happy to clarify.

  1. Testing small PRs - yep, you should test it, and having written tests would be great. Coding agents are pretty great at generating those these days.
  2. We will do manual testing on our side of before & after functionality.
  3. Not much, if you'd like, there's 3rd party documentation over at https://deepwiki.com/Mudlet/Mudlet/1-overview. I can't vouch for its correctness though.
  4. We can pay the bounty directly, that's ok.

vadi2 avatar Oct 14 '25 09:10 vadi2

/attempt #8030

sevenstar19950101 avatar Oct 21 '25 03:10 sevenstar19950101

@vadi2 is this bounty still open can i work on this ?

rishi-jat avatar Oct 30 '25 16:10 rishi-jat

is this bounty still open can i work on this ?

Yes @rishi-jat - It is open. Want to add your plan? The only request is that it's not an LLM-generated strategy. We can do those ourselves just as well, that's the easy part! I'd like to see it be relatable to the real-world.

Kebap avatar Oct 30 '25 16:10 Kebap

Sure @Kebap, I’m working on it. I’ll share my plan and update you as soon as I come up with a solid solution.

rishi-jat avatar Oct 30 '25 16:10 rishi-jat

All,

Big thanks for expressing interest to work on this. Unfortunately, we haven't been able to pick someone to work on this, and we'll cancel the bounty. After some retrospection, tackling this on a volunteer basis would be better. Luckily nobody has gotten too far in the migration.

Thanks everyone for participating.

vadi2 avatar Oct 30 '25 17:10 vadi2

I have posted a detailed architecture and migration plan for the libmudlet split here: #8635 I am ready to start working on Phase 1 once the plan is reviewed.

Youssef22eee avatar Dec 12 '25 15:12 Youssef22eee