From baddd3280a3653219d6af629f7010bf98cff0c2e Mon Sep 17 00:00:00 2001 From: Zhang Jingqiang Date: Sun, 5 Jan 2025 17:24:28 +0800 Subject: [PATCH] require aarch64 neon and aes feature by default --- .cargo/config.toml | 5 +++++ doc/openssl-variants.md | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index fff79c321..98ebd3f87 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,3 +2,8 @@ rustflags = [ "-C", "target-cpu=x86-64-v2", ] + +[target.'cfg(target_arch = "aarch64")'] +rustflags = [ + "-C", "target-feature=+neon,+aes", +] diff --git a/doc/openssl-variants.md b/doc/openssl-variants.md index ed642335c..593b823ea 100644 --- a/doc/openssl-variants.md +++ b/doc/openssl-variants.md @@ -3,6 +3,20 @@ OpenSSL Variants There are many forks of OpenSSL available, this doc will show you how to build with them. +# Vendored OpenSSL + +You can use `--features vendored-openssl` cargo build option to always use the latest stable OpenSSL version. + +It is also recommended to set the following C compile options: + +- x86-64 + + ```-march=x86-64-v2``` + +- aarch64 + + ```-march=armv8-a+aes``` + # Tongsuo See [Tongsuo](https://github.com/Tongsuo-Project/Tongsuo) for more introduction.