News for hackers. Stuff that matters.
Re:LibHTTP: Open Source HTTP Library in C by bootcat on Thursday November 09, 2017 @07:19PM (#15666938)
Another library worth mentioning is https://github.com/h2o/h2o
Re:LibHTTP: Open Source HTTP Library in C by aninteger on Thursday November 09, 2017 @09:06PM (#15667395)
h20 is nice, but I believe it requires libuv. libuv is a massive stack with LOTS of abstractions on top of abstractions that are sorta atypical of C libraries. If your code crashes because some assert in libuv fired, good luck navigating through the "typedef city" that libuv is. I wrote a little server built on top of libuv but I could never really get it working right on Windows (which is a platform that libuv supports fairly well I think). In the end I ended up abandoning libuv, and all the that abstraction, and just requiring Linux or BSD by targeting epoll/kqueue directly.
Re:LibHTTP: Open Source HTTP Library in C by kbenson on Thursday November 09, 2017 @10:55PM (#15667829)
I was interested to see if any of the Rust webservers allow C linking, but a cursory examination shows that they at least aren't explicit about it in their docs, if they do. I thought it would be interesting, because I know a number of them are looking to make sure of Rust's concurrency guarantees and futures-like libraries to provide what it sounds like you want, but would possibly be easier to reason about in the case of errors.[1]

1: This of course presupposes you know, or are willing to learn, Rust. That said, given what you've explained about libuv, the total time to grok libuv's code base and the time to learn Rust may be similar, but learning Rust may pay more dividends?

Re:LibHTTP: Open Source HTTP Library in C by lxtx on Friday November 10, 2017 @02:42AM (#15668551)
libh2o does not require libuv, it has its own event loop. libuv is optional.
Re:LibHTTP: Open Source HTTP Library in C by aninteger on Friday November 10, 2017 @08:34AM (#15669737)
Then their FAQ needs to be updated:

To build H2O as a library you will need to install the following dependencies:

libuv version 1.0 or above OpenSSL version 1.0.2 or above

As I understand it, regular h2o doesn't require libuv but libh2o does.

Re:LibHTTP: Open Source HTTP Library in C by deweerdt on Friday November 10, 2017 @09:10AM (#15669940)
The H2O build produces libh2o and libh2o-evloop. The latter doesn't depend on libuv.