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: Add Zig Bindings Module #2374

Merged
merged 4 commits into from
May 30, 2023
Merged

feat: Add Zig Bindings Module #2374

merged 4 commits into from
May 30, 2023

Conversation

kassane
Copy link
Contributor

@kassane kassane commented May 30, 2023

Requirements

How to work Zig Binding?

@cImport/@cInclude (zig translate-c inside) read opendal.h on <root_dir>/bindings/c/include to auto-generate a binding.

zig build: opendal.zig inside [@cImport(@cInclude("opendal.h"));] => translate-c => (opendal.h => cimport.zig)
zig build: opendal.zig <= cimport.zig
zig build: <your project> <= opendal.zig <= libopendal_c

more info:
https://ziglang.org/documentation/master/#cImport-vs-translate-c

cc: @Xuanwo

References

@Xuanwo Xuanwo changed the title Zig Bindings - Module feat: Add Zig Bindings Module May 30, 2023
- devcontainer: add zigup (like: rustup unofficial)
- CI: zig binding
- zig build: build opendal_c library
@kassane kassane marked this pull request as ready for review May 30, 2023 17:35
@kassane kassane requested review from xyjixyjixyji and Xuanwo May 30, 2023 17:35
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks lot!

@Xuanwo Xuanwo merged commit 59af646 into apache:main May 30, 2023
@kassane kassane deleted the zig branch May 30, 2023 18:53
@Xuanwo Xuanwo mentioned this pull request Jun 2, 2023
@suyanhanx suyanhanx mentioned this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants