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

[GitHub] [incubator-opendal] jiaoew1991 opened a new pull request, #3204: Demo for bindings/go using CGO

jiaoew1991 opened a new pull request, #3204:
URL: https://github.com/apache/incubator-opendal/pull/3204

   This demo attempts to provide Go bindings by CGO, referring to the writing style of https://github.com/confluentinc/confluent-kafka-go/blob/master/kafka/build_dynamic.go.
   
   To run the test, follow these steps:
   
   1. Write an opendal_c.pc file, for example:
   
   ```
   libdir=/path/to/opendal/target/debug/
   includedir=/path/to/opendal/bindings/c/include/
   
   Name: opendal_c
   Description: opendal c binding
   Version:
   
   Libs: -L${libdir} -lopendal_c
   Cflags: -I${includedir}
   ```
   
   2. Set the PKG_CONFIG_PATH environment variable to include the path of opendal_c.pc, for example:
   
   ```
   export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/path/to/opendal_c.pc/"
   ```
   
   3. Run go test:
   
   ```
   go test -tags dynamic .
   ```


-- 
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


[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #3204: Demo for bindings/go using CGO

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #3204:
URL: https://github.com/apache/incubator-opendal/pull/3204#discussion_r1339760734


##########
bindings/go/build_dynamic.go:
##########
@@ -0,0 +1,11 @@
+//go:build dynamic

Review Comment:
   Please add license headers for all files.
   
   Use the following commands to format:
   
   ```shell
   docker run -it --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native format
   ```



-- 
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


[GitHub] [incubator-opendal] Xuanwo commented on pull request #3204: Demo for bindings/go using CGO

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #3204:
URL: https://github.com/apache/incubator-opendal/pull/3204#issuecomment-1738714420

   > 1. Write an opendal_c.pc file
   
   Learnt a lot.


-- 
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


[GitHub] [incubator-opendal] Xuanwo merged pull request #3204: feat: Add basic support for bindings/go using CGO

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #3204:
URL: https://github.com/apache/incubator-opendal/pull/3204


-- 
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