Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
70 stars 30 forks source link

feat: Add option to static linking with openssl #104

Closed ikrivosheev closed 1 year ago

ikrivosheev commented 1 year ago
  1. Added YARA_OPENSSL_STATIC env for static linking with openssl
  2. Rename env OPENSSL_DIR to YARA_OPENSSL_DIR - remove name conflict with rust-openssl
  3. Rename env OPENSSL_LIB_DIR to YARA_OPENSSL_LIB_DIR - remove name conflict with rust-openssl
  4. Rename env OPENSSL_INCLUDE_DIR to YARA_OPENSSL_INCLUDE_DIR - remove name conflict with rust-openssl
  5. Rename env LIBYARA_STATIC to YARA_STATIC - for uniform with other envs
  6. Improve doc

@vthib you added envs for openssl, can you look at the PR? My thought was: remove name conflict with rust-openssl, maybe I am not right and it's ok.

Hugal31 commented 1 year ago

LGTM! Did you consider to use a cargo feature for the YARA_STATIC and YARA_OPENSSL_STATIC? Is that something we want?

ikrivosheev commented 1 year ago

LGTM! Did you consider to use a cargo feature for the YARA_STATIC and YARA_OPENSSL_STATIC? Is that something we want?

Yes! It makes sense! Done)

vthib commented 1 year ago

@ikrivosheev I added them to mimic rust-openssl, so that setting the env can work for both.

I'm not sure why the collision would be a bad thing, unless you want to use different versions of openssl for both.

But splitting them is fine too, just a bit more annoying when both OPENSSL_* and YARA_OPENSSL_* have to be set instead of just the OPENSSL_* one

ikrivosheev commented 1 year ago

@Hugal31 do we want to add support both envs: OPENSSL_* and YARA_OPENSSL_*?