Comment by FeepingCreature

5 years ago

So what's the current approach to use quic from C? All that pops up on a cursory google are repos untouched since 2014.

https://en.wikipedia.org/wiki/Quic#Source_code

I see at least 2 here which have commits from 2021.

To be blunt though, I don't like C. It does low-level better than many languages, but C's idea of high-level is too low.

If I had to use QUIC from C, I would pick a Rust or C++ library, write a wrapper that makes it basically into a single-threaded epoll knock-off, and then call that. If I had to do it in pure C, I'd give up.

For my pet projects, I want to use the tools that make me most comfortable, where I can slide between low and high exactly when I want. Web browsers struggle to go low, and C struggles to go high.

  • Thanks, that's exactly what I wanted.

    I hate C as a language, but I think it makes for a great API. Any language under the sun can bind to C. To bind to Rust or C++, you'd need to basically be a Rust/C++ compiler. From that perspective, I don't have a problem with having a Rust library with a C interface, except it might be harder to maintain for distros. gcc/g++ are everywhere at least.

msquic would be a good start, which is the protocol implementation from Microsoft. I used it for a project of mine which used Quic for something not HTTP/3 related.