pornel/lodepng-rust — pull request #2 by ruud-v-a (2014-08-17 14:07:34+00:00)
Title: Cargoify lodepng-rust

This enables Cargo for lodepng-rust. The downside is that the nice makefile has to be replaced with a much less flexible build script, because `make` is not available on Windows (at least, it is not part of mingw-build which is a dependency of the compiler).

I tested this on Windows and on Arch Linux by adding it as a dependency of an existing project that uses Cargo. Cargo automatically clones the repository, executes the build script that downloads and builds lodepng, and then builds the rlib. `cargo build` works in the lodepng-rust repository.

I can imagine that it is desired to be able to use `$(CC)` and `$(CFLAGS)` instead of hard-coding `gcc`. This PR is just a minimal working Cargo package. Maybe the build script could detect the environment, and delegate to `make` if it is supported?