silver-ymz opened a new pull request, #2980:
URL: https://github.com/apache/incubator-opendal/pull/2980

   ## A demo for cpp binding
   
   We use [`cxx`](https://cxx.rs/) to interop between Rust and C++.
   
   About build system, rust side still use `cargo`. For better integration with 
google test, we use [`cmake`](https://cmake.org/) and 
[`ninja`](https://ninja-build.org/) to build c++ code. All build scripts are 
written in `cmake`, so `ninja` can be replaced by 
[`make`](https://www.gnu.org/software/make/manual/make.html) or 
[`bazel`](https://bazel.build/). I choose it just because it looks like faster.
   
   ### Example
   
   ```cpp
   #include "opendal.hpp"
   #include <vector>
   
   int main() {
       auto op = opendal::Operator("memory");
       std::vector<uint8_t> data = {1, 2, 3, 4, 5};
       op.write("test", data);
       auto result = op.read("test");  // result == data
   }
   ```
   
   ### Exist Problem
   
   Now I can only build static library, failed to build dynamic library.
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to