Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Telegrand: TDLib + GObjects + Flatpak + i18n #19

Closed
melix99 opened this issue May 19, 2021 · 2 comments · Fixed by #18
Closed

Rewrite Telegrand: TDLib + GObjects + Flatpak + i18n #19

melix99 opened this issue May 19, 2021 · 2 comments · Fixed by #18

Comments

@melix99
Copy link
Collaborator

melix99 commented May 19, 2021

Note: this issue serves solely for general discussions about the rewrite branch and it will be closed after the merge in the main branch. I'll open new issues for discussing more specific implementations soon.

Telegrand was born as a testing/experimental project to learn Rust and Gtk4, so it has a really bad design and generally some implementation choices don't help to contribute to the project (even for me). This was ok for the initial test purpose that the project had, but the increasing (and unexpected!) interest in the project pushed me to a complete rewrite of the project, guided by all the things that I learned (both from my project and also looking at other similar projects).

The main aspect of the rewrite is the use of TDLib instead of grammers for the Telegram API backend. This change will add a fairly big dependency (88 MiB on Arch) but it will allow to create a very complete Telegram client compared to grammers (which is btw also a really nice project, it's just not suitable for the aim of Telegrand). For the TDLib interface for Rust, I developed a library that it contains a basic client interface and an automatic generator that generates all the types/functions supported from TDLib.

The other big change is the use of GObjects wrappers for exposing the internal data provided by TDLib objects as GObjects properties and to bind them to the appropriate GtkWidgets. This allows us to do less widgets logic as the widgets will be automatically updated when the internal data changes.

The remaining changes are the out-of-box support for Flatpak packaging and the internationalization support. Multi-account support is also on my wish list, but I'm still not sure if I want to add support for it before the merge.

@0xdeafbeef
Copy link

You can get tl generator here

@melix99
Copy link
Collaborator Author

melix99 commented May 22, 2021

You can get tl generator here

I've already implemented the tl generator for tdlib using a modification of grammers-tl-gen. It should be good enough for start using it in Telegrand.

@melix99 melix99 pinned this issue Jun 4, 2021
@melix99 melix99 unpinned this issue Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants