openshift-s2i / s2i-rust

Source-to-Image template for Rust applications
https://www.rust-lang.org/
Other
7 stars 13 forks source link

Assemble with optimizations, so run doesn't rebuild #5

Closed cuviper closed 6 years ago

cuviper commented 6 years ago

The assemble scripts were using plain cargo build, which only produces target/debug/ binaries. Then when the run scripts used cargo run --release, Cargo had to build target/release/ binaries first. The assembled debug build was a waste.

The simple solution is to assemble with cargo build --release.

nak3 commented 6 years ago

It makes every build time longer, but there seems to be no choice but to add --release to cargo build. Runtime performance is more important build time, so I agree this idea.

0xmichalis commented 6 years ago

/lgtm