diff --git a/Cargo.toml b/Cargo.toml index 77ffbdf..b3efc07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,12 @@ edition = "2018" [lib] crate-type = ["cdylib"] +[profile.release] +opt-level = 3 +lto = "fat" +codegen-units = 1 +panic = "abort" + [dependencies] sha2 = "0.9" malloc-array = "1.4" diff --git a/Makefile b/Makefile index 0d1a2de..bb9cb3e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ INSTALL:= /usr/local/lib khash: - cargo build --release + RUSTFLAGS="-C target-cpu=native" cargo build --release strip ./target/release/libkhash.so test: