From c884cf5bbb4153c02b104f715314eef96d150a60 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 13 May 2022 07:05:38 +0000 Subject: [PATCH] make it maybe faster --- Cargo.toml | 4 ++++ Dockerfile | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f72f14b4..71b1e1ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,7 @@ members = [ "linkedhashmap", "web3-proxy", ] + +[profile.release] +lto = true +panic = "abort" diff --git a/Dockerfile b/Dockerfile index 860ad7ea..29ed4f00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM rust:1-bullseye as builder +# potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html +ENV RUSTFLAGS "-C target-cpu=native" + WORKDIR /usr/src/web3-proxy COPY . . RUN --mount=type=cache,target=/usr/local/cargo/registry \