You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "kassane (via GitHub)" <gi...@apache.org> on 2023/05/30 16:53:46 UTC

[GitHub] [incubator-opendal] kassane commented on a diff in pull request #2374: feat: Add Zig Bindings Module

kassane commented on code in PR #2374:
URL: https://github.com/apache/incubator-opendal/pull/2374#discussion_r1210560959


##########
bindings/zig/src/opendal.zig:
##########
@@ -0,0 +1,74 @@
+pub const opendal = @cImport(@cInclude("opendal.h"));

Review Comment:
   Currently `zig binding` will depend on `c binding` to work.
   The purpose is to unify any changes between the two. That is, it means that with every change in the C header, all you have to do is rebuild the `zig binding` and it will change the `cimport.zig` too.
   
   `@import("opendal")` == `opendal.zig` to zig project, use module on your project `build.zig`.
   https://github.com/apache/incubator-opendal/blob/b25a32152508df6b98481d504114d1207f351db4/bindings/zig/build.zig#L7-L14
   
   More info (my post): https://kassane.github.io/2023/05/03/zig-pkg/



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org