Opened 3 years ago

Last modified 3 years ago

#6065 new Enhancement

libutp-c

Reported by: sylware Owned by: jordan
Priority: Normal Milestone: None Set
Component: libtransmission Version: 2.84+
Severity: Normal Keywords:
Cc:

Description

Hi, I coded an ISO C90-ish port of c++ libutp. It's a drop-in replacement for transmission libutp. I have been running a transmission build with this port for a little while now. (no c++ compiler/runtime required anymore) https://github.com/sylware/libutp-c

Attachments (1)

transmission-libutp-c.patch.zip (62.9 KB) - added by tals 3 years ago.

Download all attachments as: .zip

Change History (11)

Changed 3 years ago by tals

comment:1 Changed 3 years ago by tals

Not sure if I did it in a proper way. However, transmission was built successfully. Please find the file attached.

comment:2 follow-up: Changed 3 years ago by mike.dld

What's the plan in the long run? Are you going to sync the library with upstream changes on a constant basis? Since we're going to move to more recent libutp version (see #5888) at some point, and it has different API, I wonder if making use of your library makes any sense right now. It's a nice project on its own for sure, but let's see how it goes ;)

comment:3 Changed 3 years ago by sylware

Oh! Which libutp git commit (i.e. version) is used in current transmission? (from github.com repository)

comment:4 Changed 3 years ago by mike.dld

Judging from browser/trunk/CMakeLists.txt, 7c4f19abdfe0f781311cdc68e147084961d67424.

comment:5 in reply to: ↑ 2 Changed 3 years ago by sylware

Replying to mike.dld:

What's the plan in the long run? Are you going to sync the library with upstream changes on a constant basis? Since we're going to move to more recent libutp version (see #5888) at some point, and it has different API, I wonder if making use of your library makes any sense right now. It's a nice project on its own for sure, but let's see how it goes ;)

Ok, got it. Will start to port latest libutp to ISO C90-ish very soon, in a different branch. Just a matter of a few hours/days (latest upstream libutp seems very similar to transmission libutp)

Till you update libutp, freeing transmission from the c++ requirement would be a good thing.

comment:6 Changed 3 years ago by sylware

Done. I wrote an ISO C90-ish of upsteam libutp: https://github.com/sylware/libutp-c/tree/upstream Once you update transmission libutp, I'll update the C code with the latest upstream.

Meanwhile, you can switch the current libutp code in transmission in order to drop the c++ dep: https://github.com/sylware/libutp-c/tree/master

comment:7 Changed 3 years ago by mike.dld

Once again, I'm not sure of the future and you never answered the questions. I don't want to switch to another library just because of C++ dependency (those who need to get rid of it could just use your repo).

comment:8 Changed 3 years ago by sylware

The current libutp in transmission is 3 years old and based on the old API. The libutp-c master branch is this version of libutp api, but without c++. In the future, when you will upgrade libutp from upstream, you will have to modify transmission code to the new API.

In the future, once you have updated transmission code to the new API, whatever were the old api libutp version (C or c++), it will be trashed.

I could try to modify the autotool scripts to allow the user to easily choose between the old api libutp-c++ and old api libutp-c, with the c++ version being th default. What do you reckon? (that would make everybody happy I guess)

comment:9 Changed 3 years ago by mike.dld

I'm not asking about future of Transmission, but that of libutp-c. BitTorrents's libutp is still the upstream, libutp-c is just a one-time rewrite at the moment. If Transmission will use libutp-c instead of libutp, then libutp-c needs to be constantly synced with all the changes made in libutp by their contributors. The question was, are you going to do this, or is this going to be a one-time C++ to C port for the rest of times which you are not planning to keep actualized.

Hopefully these concerns make sense to you.

comment:10 Changed 3 years ago by sylware

In the context of the choice of old api libutp implementations, since the current old api libutp-c++ in transmission has not been updated in 3 years(!), asking for updates of old api libutp-c does not make sense.

New api libutp implementations is another matter, we'll see once you did the upgrade.

Note: See TracTickets for help on using tickets.