From c1144e5e42f205aba166ec6aec3b69d517d3488b Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 17 May 2022 16:36:42 +0000 Subject: [PATCH] keep RUSTFLAGS in one place --- .cargo/config.toml | 3 ++- Dockerfile | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index bff29e6e..4c1262bc 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,3 @@ [build] -rustflags = ["--cfg", "tokio_unstable"] +# potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html +rustflags = ["-C", "target-cpu=native", "--cfg", "tokio_unstable"] diff --git a/Dockerfile b/Dockerfile index 29ed4f00..860ad7ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ 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 \