]> git.rkrishnan.org Git - functorrent.git/blob - README.md
README: update on the current state
[functorrent.git] / README.md
1 # A bittorrent client.
2
3 [![Build Status](https://travis-ci.org/vu3rdd/functorrent.svg?branch=master)](https://travis-ci.org/vu3rdd/functorrent)
4
5 ## Building
6
7 Functorrent can be build with [Cabal](https://www.haskell.org/cabal/) sandbox or
8 [Nix](https://nixos.org/nix/).
9
10 ### Cabal sandbox
11
12 Sandboxes give you per project independent containers, just like Python's
13 virtualenv.
14
15
16     $ git clone https://github.com/vu3rdd/functorrent && cd functorrent
17     $ cabal sandbox init
18     $ cabal install --only-dependencies --enable-tests
19     $ cabal build # binaries in ./dist/built/functorrent/*
20
21 ### Building with Nix
22
23 ``$ nix-shell``` at the root of the source code repo should drop you into a
24 shell which has all the package dependencies installed.
25
26
27     $ nix-shell --pure
28     [...]
29     [nix-shell] $ cabal configure && cabal build
30
31 ## Goals
32
33 - [Optimized for Fun](http://www.slideshare.net/autang/ofun-optimizing-for-fun).
34   (should have called it "funtorrent")
35 - Become more profient with Haskell.
36 - Implement something non-trivial with Haskell (crypto, file operations, network
37   operations, concurrency, bit twiddling, DHT).
38 - Follow the spec - https://wiki.theory.org/BitTorrentSpecification
39 - Easy for newbies like me to read and understand along side the spec.
40 - doctest and quickcheck tests.
41 - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
42
43 ## Current Status
44
45 - can decode torrent files (bencoding)
46 - talk to the tracker and get the peer list
47 - the `main' program takes a torrent file (in the local file system) as input and
48   prints the {ip,port} for each peer, after talking to the tracker.
49 - can handshake with the peer.
50 - peer wire protocol (in progress)
51
52 ## TODO
53
54 *    Test suite.
55 *    Peer protocol (in progress).
56 *    Get the file download working in the simplest possible way.
57 *    Concurrency (threads per peer)
58 *    other advanced features of Bit Torrent (like DHT).