From 80b71c56e8cab419c1a49cd763e11942d5f3464b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Mon, 9 Oct 2023 16:59:58 +0200 Subject: [PATCH] Enable AES optimization in ARMv8 (#274) ## Type of change ``` - [ ] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [x] Other ``` ## Objective Enable the ARMv8 Cryptographic Extensions, for a performance increase in our encryption operations (https://docs.rs/aes/latest/aes/#armv8-intrinsics-rust-161) Enabling this requires using Rust 1.61, but I just realized that the changes in the `config.toml` would only apply to anyone building the SDK from source and not to anyone using it from crates.io. Seeing as we're using the latest stable when building ourselves, this seems okay. --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..d7945d088 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.'cfg(target_arch="aarch64")'] +rustflags = ["--cfg", "aes_armv8"]