emk/heroku-buildpack-rust — pull request #2 by waterlink (2014-10-25 11:33:56+00:00)
Title: Fix missing rust libs problems, improve caching and refactor compile steps

- I had a problem when running compiled app on heroku: it wasn't able to find `libnative` library which is a part of rustc libs directory. After inspecting a slug I understood, that it has no build cache when dyno is running. Resolved issue by copying these libs inside of build directory and sourcing proper `LD_LIBRARY_PATH`.
- It was a pain to wait for dependencies to be re-downloaded through git and rebuilt from scratch at each deploy. So I put build artifacts (`target` and `$cargo_home`) to cache, and on next builds reusing it, so `Cargo` can decide what to download and what to rebuild on any updates in `Cargo.lock` file. Turns out that `.git` folders in cache survive between build perfectly.
- Since `bin/compile` is too bloated, I have refactored it to different `bin/steps/*` and call them from `bin/compile`.