Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pre-generated bindings for target #80

Merged

Conversation

ikrivosheev
Copy link
Contributor

Close: #52

@ikrivosheev ikrivosheev marked this pull request as ready for review June 19, 2022 20:55
@ikrivosheev
Copy link
Contributor Author

@Hugal31 done! Can you review?

@ikrivosheev
Copy link
Contributor Author

ikrivosheev commented Jun 19, 2022

@Hugal31 I see we have only 3 different bindings...

sha256sum *
fc180d619b96d63c608fd465433709e3b4c3c47e88b2c683d8dfd1ba9c002e56  yara-4.2.1-i686-pc-windows-gnu.rs
fc180d619b96d63c608fd465433709e3b4c3c47e88b2c683d8dfd1ba9c002e56  yara-4.2.1-i686-pc-windows-msvc.rs
fc180d619b96d63c608fd465433709e3b4c3c47e88b2c683d8dfd1ba9c002e56  yara-4.2.1-x86_64-pc-windows-gnu.rs
fc180d619b96d63c608fd465433709e3b4c3c47e88b2c683d8dfd1ba9c002e56  yara-4.2.1-x86_64-pc-windows-msvc.rs
608d6af6ea210c8abacdce8a248b66a2a5311b343cca9c020f410193e3484c20  yara-4.2.1-x86_64-apple-darwin.rs
46ff01af68b1ce1fcd45e94b2a8763cb30a5c2ce6c0161c2fef1ede1bc429212  yara-4.2.1-i686-unknown-linux-gnu.rs
46ff01af68b1ce1fcd45e94b2a8763cb30a5c2ce6c0161c2fef1ede1bc429212  yara-4.2.1-aarch64-unknown-linux-gnu.rs
46ff01af68b1ce1fcd45e94b2a8763cb30a5c2ce6c0161c2fef1ede1bc429212  yara-4.2.1-x86_64-unknown-linux-gnu.rs

Update 1:
GitHub Actions cannot run on not x86 platform...
Here is issue: actions/runner#1181

Update 2:
@Hugal31 what do you think about dropping x32 platform from pre-genereted bindings? And we remove UB from code.

@Hugal31
Copy link
Owner

Hugal31 commented Jun 20, 2022

Just to be sure, the bindings are the same in i686-pc and x86_64-pc because in fact the runner ran on a x86_64 environment?
If so, did aarch64 worked?

To answer your question, I don't see any other option (unless someone is willing to generate the bindings themself).

Anyway, thank you so much for your work!

@ikrivosheev
Copy link
Contributor Author

Just to be sure, the bindings are the same in i686-pc and x86_64-pc because in fact the runner ran on a x86_64 environment?

Yes.

If so, did aarch64 worked?

No, because GitHub actions run on x86_64

@ikrivosheev
Copy link
Contributor Author

@Hugal31 after some tries to build aarch64 I get: https://github.com/Hugal31/yara-rust/runs/6987670647?check_suite_focus=true#step:4:665

Leave only x64_86 for linux, windows and mac?

@ikrivosheev ikrivosheev requested a review from Hugal31 June 22, 2022 13:05
@Hugal31 Hugal31 merged commit 9d005d8 into Hugal31:master Jun 22, 2022
@ikrivosheev ikrivosheev deleted the feat/pre-generated_bindings_for_target branch June 22, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bindgen pre-generated size_t has the wrong type on x86 and causes UB
3 participants