Coder Social home page Coder Social logo

Create C/CPP bindings about quinn HOT 3 OPEN

quinn-rs avatar quinn-rs commented on June 21, 2024
Create C/CPP bindings

from quinn.

Comments (3)

Ralith avatar Ralith commented on June 21, 2024

You can use Rust's FFI for that. Note that the high-level quinn crate relies on tokio, which will be difficult to interoperate with from C/C++. Binding quinn-proto and using it with an existing C/C++ event loop would make more sense, but is a complicated task in its own right. Additionally, quinn-proto's interface is currently extremely unstable. While this is an interesting use-case that we'd like to support someday, it would be difficult to accomplish at present.

from quinn.

VMatrix1900 avatar VMatrix1900 commented on June 21, 2024

@Ralith Thanks for you reply. Actually I am trying to write an video streaming application. It pulls video stream from the camera and encodes it(this part is done in CPP) then it will send the encoded data to transport protocol(like QUINN). In this case, I can use the TOKIO event loop and pull encoding data from CPP library then send this data with QUINN. This would be easier compared to call QUINN from CPP, right?

from quinn.

djc avatar djc commented on June 21, 2024

So you have pulling video and encoding it in C++, and you want to use the transport code from Quinn in Rust. Now you have to write driver code that pushes the encoded video out over the transport. Clearly it's possible to write the driver in either C++ or Rust, but it's up to you which of those you'd prefer. You might consider which interface is more complex (the video encoding one or the network transport one) and use the language from that one, so you have less work to do in your bindings.

from quinn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.