Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Zig bindings - Generator #1809

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

Merged
merged 6 commits into from
Mar 26, 2023
Merged

Zig bindings - Generator #1809

merged 6 commits into from
Mar 26, 2023

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Mar 23, 2023

Ref.: #1217
All architectures were listed in Ziglang.

They are compatible with both zig stage 1 (0.10.x or lower) and stage2 (0.10.x or higher) backends.
Note: Zig version 0.9 and 0.10 have support for both backends, but 0.11 it will be stage2 only.

zig 0.10: stage2 (default), add build flag: -fstage1 switch to stage1.
zig 0.9: stage1 (default), add build flag: -fno-stage1 switch to stage2.

@wtdcode
Copy link
Member

wtdcode commented Mar 23, 2023

Amazing! So zig could interact with raw dynamic library api without further ffi wrapper?

@kassane
Copy link
Contributor Author

kassane commented Mar 23, 2023

Amazing! So zig could interact with raw dynamic library api without further ffi wrapper?

Exactly, no need libC! cFFI in Zig is optional.

@aquynh
Copy link
Member

aquynh commented Mar 23, 2023 via email

@aquynh
Copy link
Member

aquynh commented Mar 23, 2023 via email

@wtdcode
Copy link
Member

wtdcode commented Mar 23, 2023

Note you also need to target dev branch.

@kassane kassane changed the base branch from master to dev March 23, 2023 18:50
@kassane
Copy link
Contributor Author

kassane commented Mar 23, 2023

Hi @aquynh

Interesting! What are you doing with this binding?

Plan to package unicorn for use with zig projects.
But, I realized that it will be complicated to port the scripts generated during the qemu build.

Draft and stdout:
https://gist.github.com/kassane/48c4fff6d95e5fa76d63b004f8f39b4c

Please also update README with this new binding.

Ok

@wtdcode wtdcode merged commit 2af8219 into unicorn-engine:dev Mar 26, 2023
@wtdcode
Copy link
Member

wtdcode commented Mar 26, 2023

Thanks and welcome!

@kassane kassane deleted the zig-bindgen branch March 26, 2023 12:56
@kassane kassane mentioned this pull request Apr 12, 2023
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.

3 participants