]> git.rkrishnan.org Git - functorrent.git/blob - README.md
README: update the current status. ☺
[functorrent.git] / README.md
1 # A bittorrent client.
2
3 [![Join the chat at https://gitter.im/vu3rdd/functorrent](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vu3rdd/functorrent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
5 [![Build Status](https://travis-ci.org/vu3rdd/functorrent.svg?branch=master)](https://travis-ci.org/vu3rdd/functorrent)
6
7 ## Building
8
9 Functorrent can be build with [Stack](https://github.com/commercialhaskell/stack) or
10 [Nix](https://nixos.org/nix/).
11
12 ### Stack
13
14 Sandboxes give you per project independent containers, just like Python's
15 virtualenv.
16
17
18     $ git clone https://github.com/vu3rdd/functorrent && cd functorrent
19     $ cabal install stack # or install stack by other means
20     $ stack build # binaries in $(pwd)/.stack-work/install/x86..../lts-2.16/7.8.4/bin/functorrent
21
22 ### Building with Nix
23
24 ``$ nix-shell``` at the root of the source code repo should drop you into a
25 shell which has all the package dependencies installed.
26
27
28     $ nix-shell --pure
29     [...]
30     [nix-shell] $ cabal configure && cabal build
31
32 ### Usage
33
34 If you invoke functorrent without any options, it expects the contents of a torrent file
35 to be given in stdin. So
36
37 $ cat ubuntu-14.10-desktop-amd64.iso.torrent | functorrent
38 [....]
39
40 Or one can explicitly specify the torrent file as input.
41
42 $ functorrent ubuntu-14.10-desktop-amd64.iso.torrent
43 [...]
44
45 ## Goals
46
47 - [Optimized for Fun](http://www.slideshare.net/autang/ofun-optimizing-for-fun).
48   (should have called it "funtorrent")
49 - Become more profient with Haskell.
50 - Implement something non-trivial with Haskell (crypto, file operations, network
51   operations, concurrency, bit twiddling, DHT).
52 - Follow the spec ([official spec](http://bittorrent.org/beps/bep_0003.html), [unofficial spec](https://wiki.theory.org/BitTorrentSpecification))
53 - Easy for newbies like me to read and understand alongside the spec.
54 - doctest and quickcheck tests.
55 - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
56
57 ## Current Status
58
59 - most of the peer wire protocol works.
60 - talks only to one peer at the moment. Single threaded.
61 - can download files. But needs every piece to be served by the peer it connected to.
62
63 ## TODO
64
65 *    Test suite.
66 *    Talk to multiple peers.
67 *    Piece download algorithms.
68 *    Concurrency (threads per peer)
69 *    Multifile torrent support.
70 *    other advanced features of Bit Torrent (like DHT).