Skip to content

feat: Add Zig Bindings Module#2374

Merged
Xuanwo merged 4 commits intoapache:mainfrom
kassane:zig
May 30, 2023
Merged

feat: Add Zig Bindings Module#2374
Xuanwo merged 4 commits intoapache:mainfrom
kassane:zig

Conversation

@kassane
Copy link
Copy Markdown
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
Comment thread bindings/zig/CONTRIBUTING.md
Comment thread bindings/zig/src/opendal.zig
- devcontainer: add zigup (like: rustup unofficial)
- CI: zig binding
- zig build: build opendal_c library
@github-actions github-actions Bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label May 30, 2023
@kassane kassane marked this pull request as ready for review May 30, 2023 17:35
@kassane kassane requested review from Xuanwo and xyjixyjixyji May 30, 2023 17:35
Copy link
Copy Markdown
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

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants