Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
76 stars 29 forks source link

Compiling the yara-rust code for the x86 #138

Open muteb opened 10 months ago

muteb commented 10 months ago

Hi Guys,

I'm interested in compiling the yara-rust code for the x86 architecture and was wondering about the process involved. Could you please provide some guidance on how to proceed with this? Additionally, if x86 support is not currently available, I would like to offer my assistance in making it compatible. What would be the best way to start contributing towards this goal from previous experiences?

Thanks

Hugal31 commented 10 months ago

Hi,

I never tried but you should start by build/installing libyara itself, then just build this crate with the default feature flags.

If it doesn't find the libyara installation automatically, you can use the environment variables described in yara-sys README (namely YARA_LIBRARY_PATH and YARA_INCLUDE_DIR) to point to the location of libyara.

Alternatively, you could just try the vendored feature flag, which will try to build libyara and statically links against it.

muteb commented 9 months ago

Thank you very much for your help. I managed to create bindings for x86 windows and it worked as good as I expected. I also placed them into the "bingings" folder under yara-sys and they should work with the vendored option as tested. I will pull this to your repo.