[lib]
doctest = false
+[profile.release]
+strip = "symbols"
+debug = 0
+lto = "thin"
+
[profile.dev]
+strip = "symbols"
debug = 0
[features]
RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
RUN cargo build --target ${CARGO_BUILD_TARGET}
-# reduce binary size
-RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server
-
RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server
# The alpine runner
RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
RUN cargo build --release
-# reduce binary size
-RUN strip ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server
-
RUN cp ./target/$CARGO_BUILD_TARGET/$RUSTRELEASEDIR/lemmy_server /app/lemmy_server
# The alpine runner
RUN cargo build --release
-# reduce binary size
-RUN strip ./target/release/lemmy_server
-
RUN cp ./target/release/lemmy_server /app/lemmy_server
# The Debian runner