Is that even possible to put together a native Golang torrent library covering most use cases?
Given the number of singular implementations I begin to wonder it's not going to be easy.
A recap of projects found on the web is below, the pro/cons list is totally ongoing work, I tried a raw estimation of a project's value, so is mostly rubbish, but it should be used to understand what to recycle and when.
To discuss whether this optimistic project can be a reality, open an Issue, or propose edits as Pull Request
Let developers work together towards an usable torrent library for Go language community.
It's reasonable to realize an efficient pure Go implementation, comparable in speed, but easier to read than lower level libraries.
-
BEP 29: uTorrent transport protocol, also more detailed on libtorrent docs
-
NAT-PMP support, from TaiPei-Torrent
-
UPNP support, from TaiPei-Torrent
Torrent libraries written in Golang (or attempts to!), let's recap them:
- cenkalti/rain
- Nice implemented feature list
- Tests, unknown coverage
- Blank commits, or single worded commits
- torrance/libtorrent
- Seems abandoned since Aug 2014
- deoxxa/libtorrent,
torrance/libtorrent
's fork- Fork from torrance/libtorrent
- Tests, unknown coverage
- Seems better coded than the original
- Issue tracker not active despite being a full-fledged fork
- README missing
- nsf/libtorgo/
- Re-implemented already existing libraries, bencode
- README missing
- Seems abandoned since March 2014
Bencode libraries recap (most of them lead to torrent libraries):
- zeebo/bencode
- Recently updated
- 8 Packages using it
- Tested
- Example Usage
- chihaya/bencode
- Appreciate the idea, not using reflect package
- Used by chihaya tracker
- Seems not developed since July 2014, stable?
- Would really love benchmarks comparing use of reflection and not
- jackpal/bencode-go
- Seems stable, is it?
- Used by both
tulva
andTaipei-Torrent
- Tests all written in one file
Other libraries recap:
- nictuku/dht
- BEP 5 functionality
- Test coverage seems adequate
- Used by
Taipei-Torrent
Full fledged packages:
- jackpal/Taipei-Torrent: BitTorrent client
- Oldest project of the list, co-written with nicktutu, something good must come out of this
- Many features without tests
- BEP feature support list is not there
- Not coded to be embeddable
- jtakkala/tulva: BitTorrent client
- Feature list, but no BEP feature support
- No tests whatsoever
- Single torrent support
- drbawb/babou: BitTorrent HTTP tracker
- Test coverage is so-so
- Not followed much, despite it's large development effort
- Final product, don't know if it might be useful code-wise to a torrent library
- chihaya/chihaya: BitTorrent HTTP tracker
- BitTorrent tracker, working
- Follows a clever driver system
- Benchmarks!
- Final product, don't know if it might be useful code-wise to a torrent library