]> git.rkrishnan.org Git - functorrent.git/blob - README.md
README: a note on using nix-shell
[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 I suggest using cabal sandbox.
8
9 Or you can use [Nix](https://nixos.org/nix/), in which case, typing ```nix-shell```
10 at the root of the source code repo should drop you into a shell which has all the package
11 dependencies installed.
12
13 ### Steps:
14
15 ## for cabal sandbox
16 clone the repo; cd functorrent;
17
18     $ cabal sandbox init
19     $ wget http://www.stackage.org/lts/cabal.config
20     $ cabal install --only-dependencies --enable-tests
21     $ cabal build # binaries in ./dist/built/functorrent/*
22
23 ## for nix
24
25     $ nix-shell --pure
26     [...]
27     [nix-shell] $ cabal configure && cabal build
28
29 ## Goals
30
31 - Become more profient with Haskell.
32 - Implement something non-trivial with Haskell (crypto, file operations, network
33   operations, concurrency, bit twiddling, DHT).
34 - Follow the spec - https://wiki.theory.org/BitTorrentSpecification
35 - Easy for newbies like me to read and understand along side the spec.
36 - doctest and quickcheck tests.
37 - Follow Haskell Style Guide - https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
38
39 ## Current Status
40
41 - can decode torrent files (bencoding)
42 - talk to the tracker and get the peer list
43 - the `main' program takes a torrent file (in the local file system) as input and
44   prints the {ip,port} for each peer, after talking to the tracker.
45
46 ## TODO
47
48 *    Test suite.
49 *    Peer protocol.
50 *    Get the file download working in the simplest possible way.
51 *    Concurrency (threads per peer)
52 *    other advanced features of Bit Torrent (like DHT).