You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openssl = { version = "0.10.64", features = ["vendored"] }
[profile.release]
strip = true
opt-level = "z"
lto = true
After adding OpenSSL, the compiled binary is 3M larger
openssl = { path = "./src/rust-openssl/openssl", features = ["vendored"] }
Now I will integrate the source code of OpenSSL into the project for use. I hope to find a way to streamline OpenSSL functionality.
There are too many features in OpenSSL, and I hope to disable some of them, such as RSA.
Thank you
The text was updated successfully, but these errors were encountered:
I tried compiling from Linux to Android. I don't want dynamic linking, I just want static compilation. May I ask if there is a suitable method? Thank you
If you want a heavily customized OpenSSL, then your best bet is to compile it yourself and configure rust-openssl to statically link against that:
Manual
A set of environment variables can be used to point openssl-sys towards an OpenSSL installation. They will override the automatic detection logic.
OPENSSL_DIR - If specified, the directory of an OpenSSL installation. The directory should contain lib and include subdirectories containing the libraries and headers respectively.
OPENSSL_LIB_DIR and OPENSSL_INCLUDE_DIR - If specified, the directories containing the OpenSSL libraries and headers respectively. This can be used if the OpenSSL installation is split in a nonstandard directory layout.
OPENSSL_STATIC - If set, the crate will statically link to OpenSSL rather than dynamically link.
OPENSSL_LIBS - If set, a :-separated list of library names to link to (e.g. ssl:crypto). This can be used if nonstandard library names were used for whatever reason.
OPENSSL_NO_VENDOR - If set, always find OpenSSL in the system, even if the vendored feature is enabled.
Additionally, these variables can be prefixed with the upper-cased target architecture (e.g. X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR), which can be useful when cross compiling.
After adding OpenSSL, the compiled binary is 3M larger
Now I will integrate the source code of OpenSSL into the project for use. I hope to find a way to streamline OpenSSL functionality.
There are too many features in OpenSSL, and I hope to disable some of them, such as RSA.
Thank you
The text was updated successfully, but these errors were encountered: