Hugal31 / yara-rust

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

Add support aarch64-unknown-linux-musl #124

Open fivlao opened 11 months ago

fivlao commented 11 months ago

Hello guys! We use your crate in our project which we are building us static for x86_64-unknown-linux-musl platform, but we need to build our project as static for aarch64-unknown-linux-musl platform for arm processors

Compile error logs:

Compiling yara-sys v0.20.0
The following warnings were emitted during compilation:

warning: Bindigs for target="aarch64-unknown-linux-musl" does not exists

error: failed to run custom build command for `yara-sys v0.20.0`

Caused by:
  process didn't exit successfully: `/build/target/release/build/yara-sys-32db4201171becc7/build-script-build` (exit status: 1)
  --- stdout
  cargo:rustc-link-lib=static=yara
  cargo:rustc-link-search=native=/musl/lib
  cargo:rerun-if-env-changed=YARA_LIBRARY_PATH
  cargo:rerun-if-env-changed=YARA_LIBRARY_PATH_aarch64-unknown-linux-musl
  cargo:rerun-if-env-changed=YARA_LIBRARY_PATH_aarch64_unknown_linux_musl
  cargo:warning=Bindigs for target="aarch64-unknown-linux-musl" does not exists
warning: build failed, waiting for other jobs to finish...

Could you please add support aarch64-unknown-linux-musl platform to your crate?

I can try to help If you need to

Hugal31 commented 11 months ago

Hi,

Have you considered using the bindgen feature instead of the bundled feature?

EDIT: Supporting the bundled feature aarch64 is a bit difficult, see #101.

fivlao commented 11 months ago

Hi

Have you considered using the bindgen feature instead of the bundled feature?

If I understood everything correctly We did not try We planned to do this if it is not possible to add support from your side

If it not possible we will try to use bindgen feature

msuiche commented 10 months ago

For reference: https://github.com/Hugal31/yara-rust/commit/5f050c723e597764773771ce5bba15b5ae874eda