Skip to content

Commit

Permalink
Cargo support
Browse files Browse the repository at this point in the history
  • Loading branch information
arjantopolovec committed Jun 24, 2014
1 parent 9ec851b commit 5355925
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,2 +1,2 @@
build/*
target/
doc/
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -4,7 +4,10 @@ env:
before_install:
- curl -O http://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz
- tar xzf rust-nightly-x86_64-unknown-linux-gnu.tar.gz
- yes | sudo add-apt-repository ppa:cmrx64/cargo
- sudo apt-get update
install:
- sudo apt-get install cargo
- sudo ./rust-nightly-x86_64-unknown-linux-gnu/install.sh
script:
- rustc --version
Expand Down
9 changes: 9 additions & 0 deletions Cargo.toml
@@ -0,0 +1,9 @@
[package]

name = "bencode"
version = "0.1.0"
authors = ["arjan.top@gmail.com"]

[[lib]]

name = "bencode"
4 changes: 2 additions & 2 deletions Makefile
@@ -1,7 +1,7 @@
RUSTC = rustc
RUSTDOC = rustdoc
RUSTFLAGS = -O
BUILDDIR = build
BUILDDIR = target
TESTDIR = $(BUILDDIR)/test

all: $(BUILDDIR) test lib docs
Expand All @@ -13,7 +13,7 @@ $(TESTDIR): $(BUILDDIR)
mkdir -p $@

lib:
$(RUSTC) $(RUSTFLAGS) --out-dir $(BUILDDIR) src/bencode.rs
cargo build

clean:
rm -rf $(BUILDDIR)
Expand Down

0 comments on commit 5355925

Please sign in to comment.