-
-
Notifications
You must be signed in to change notification settings - Fork 78
Add libtorrent dependency and minimal stub integration #1251
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
base: main
Are you sure you want to change the base?
Add libtorrent dependency and minimal stub integration #1251
Conversation
|
@aviralgarg05 Thank you for your first PR. My first remark, and this is about something very important, we have to rely on official libtorrent (and not on the rasterbar fork). Any very strong reason to go for this minor fork? |
I think libtorrent-rasterbar IS the official libtorrent library from github.com/arvidn/libtorrent. The "rasterbar" name comes from the project's origins. This is the correct pkg-config name used on all platforms. |
I´m not an expert of this library either but:
|
Thank you for pointing this out! I understand the confusion now. The libtorrent-rasterbar package name does indeed refer to the official libtorrent library from [https://github.com/arvidn/libtorrent]. The "rasterbar" part comes from Rasterbar Software, which is Arvid Norberg's company that develops and maintains libtorrent. Looking at the repositories: [https://github.com/arvidn/libtorrent]: The official repository with 5.8k stars, 1.1k forks, 137 contributors, and active development (latest release v2.0.11 on Jan 28) The official libtorrent website [https://libtorrent.org/] which links to the arvidn/libtorrent repository So we are definitely using the official libtorrent library, not a fork. The naming convention just reflects the company behind the project. The airium fork appears to be a personal project with minimal activity and no official status. |
- Add libtorrent-rasterbar as a hard dependency in meson.build - Create minimal LibTorrent stub class in src/libtorrent.h and src/libtorrent.cpp - Add getVersion() method to verify libtorrent integration works - Create test/libtorrent.cpp with tests for instantiation, version retrieval, and linking - Add boost include path for libtorrent header dependencies - Update meson.build to check for mustache header in source tree - Add mustache.hpp header to include directory Fixes kiwix#1238
- Removed include/mustache.hpp from version control (third-party library) - Updated meson.build to check for mustache.hpp in /opt/homebrew/include - Mustache is an external dependency that should be installed system-wide - All tests continue to pass (22/22 OK) - Fixes CodeFactor code quality issues (complex methods, redundant virtual keywords)
- Remove hardcoded /opt/homebrew/include paths from meson.build that would break CI on non-macOS platforms - Add proper GPL copyright header to libtorrent.h and libtorrent.cpp - Fix forward declaration of libtorrent::session (use struct not class) - Rename member variable to mp_session following kiwix naming convention - Fix namespace comment style to match existing codebase - Simplify test file by removing redundant test case and fixing include order libtorrent-rasterbar IS the official libtorrent library from github.com/arvidn/libtorrent - the 'rasterbar' name comes from the project's origins. This is the correct pkg-config name.
042d7bc to
9c18819
Compare
|
@veloman-yunkan After a first looks it looks good to me, at least it compiles and I don't see any obvious strange thing. Can you please have a look on your side? We need as well to:
|
veloman-yunkan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all I would like to thank you for your interest in contributing to libkiwix.
At the same time my feeling is that you picked up the wrong task for getting started with our projects. In its current form (though I see that it's merely a draft) this PR is of low value and I am afraid that it will result in mutual disappointment if the work on it continues. Adding a new dependency that is going to replace the underlying implementation (aria2) of a major component (kiwix::Downloader) that has no unit-tests is a serious undertaking. It requires good understanding of both our build infrastructure and how kiwix::Downloader is used in kiwix-desktop (part of it being nothing else than workarounds of aria2's limitations). I advise you to get your feet wet with libkiwix through another issue with quicker turnaround times for tangible results.
include/mustache.hpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have mustache.hpp in our dependencies (Update: I see that the added file was removed in the next commit, but in a clean version of the PR it shouldn't have been added at all).
Fixes #1238 (sub-issue of #1193)