diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..53fa84f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,24 @@ +# Directories +/.git/ +/.github/ +/samples/ +/benches/ + +# Files +.gitignore +*.md +LICENSE-* +committed.toml +cliff.toml +deny.toml +CNAME +rustfmt.toml +_config.yml +codecov.yml +.editorconfig +.codespellignore +renovate.json +justfile +_typos.toml +_readme.tpl +*.png diff --git a/Cargo.lock b/Cargo.lock index 00fb030..f832722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "aarty" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" dependencies = [ "cfg-if", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 48cb6bd..170addf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aarty" -version = "0.7.0-alpha.1" +version = "0.7.0-alpha.2" edition = "2021" rust-version = "1.70" authors = ["Anas Elgarhy "] @@ -62,3 +62,9 @@ text_image = [] [dev-dependencies] criterion = "0.5.1" + +[profile.release] +panic = "abort" +strip = "symbols" +lto = true +codegen-units = 1 diff --git a/Dockerfile b/Dockerfile index 81aff66..1f37129 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ WORKDIR /app FROM chef AS planner COPY . . +RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder @@ -11,6 +12,7 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true RUN cargo chef cook --release --recipe-path recipe.json COPY Cargo.toml . COPY Cargo.lock . +RUN sed -i '/^\[\[bench\]\]/,/^$/d' Cargo.toml COPY src/ src/ RUN cargo build --release --locked \ && rm -f target/release/deps/aarty*