Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Also rearranged the tests a little to make it easier to add more targets in the future. I wanted to use some colors but not sure how Travis CI handles ANSI, so dropped the idea. I can reconsider though :)
./test-image now produces:
...
Successfully built adce5d11fb8d
Successfully tagged rust-musl-builder-using-diesel:latest
Hello, world!
No DATABASE_URL set, so doing nothing
Created binary (application) `testme` project
Running tests...
--- Test case for x86_64:
Compiling testme v0.1.0 (file:///home/rust/src/testme)
Finished dev [unoptimized + debuginfo] target(s) in 0.73 secs
ldd says:
not a dynamic executable
[PASS] x86_64 binary is statically linked.
--- Test case for ARMhf:
Compiling testme v0.1.0 (file:///home/rust/src/testme)
Finished dev [unoptimized + debuginfo] target(s) in 0.82 secs
ldd says:
not a dynamic executable
[PASS] ARMhf binary is statically linked.
Added test case for ARMhf static binary.
Also rearranged the tests a little to make it easier to add more targets in the future. I wanted to use some colors but not sure how Travis CI handles ANSI, so dropped the idea. I can reconsider though :)
./test-image
now produces: