craff / simple_httpd

A library to write web server and site
https://raffalli.eu/simple_httpd/simple_httpd
23 stars 1 forks source link

Support for more OS #6

Open craff opened 1 year ago

craff commented 1 year ago

Would be nice to support at least BSD, maybe windows.

davesnx commented 2 months ago

Installing simple_httpd (from main) in Mac got the issue with conf-linux-libc-dev not being available on the OS, which makes sense, but it would be nice to install it correct

→ opam pin add simple_httpd.dev "https://github.com/craff/simple_httpd.git#c72fce03df902f72f77f82b9c70c1674982f52b2" -y
Package simple_httpd does not exist, create as a NEW package? [y/n] y
[simple_httpd.dev] synchronised (git+https://github.com/craff/simple_httpd.git#c72fce03df902f72f77f82b9c70c1674982f52b2)
simple_httpd is now pinned to git+https://github.com/craff/simple_httpd.git#c72fce03df902f72f77f82b9c70c1674982f52b2 (version dev)

[ERROR] Package conflict!
  * Missing dependency:
    - conf-linux-libc-dev
    unmet availability conditions: 'os = "linux"'
davesnx commented 2 months ago

Found polly relies on conf-linux-libc-dev since they are bindings for the Linux epoll system call. Any chance to use kqueue (https://github.com/anuragsoni/kqueue-ml) in Mac or another solution?

craff commented 2 months ago

Hello David,

Thanks for your interest. Currently, simple_httpd uses epoll/Polly for its scheduling. On MacOS, we will have to use kqueue (or go back to select, but this would really drop the performance). I can not develop this as I don't have access to a MacOS platform.

Polly, the ocaml epoll interface is only used in the file Async.ml and I think it is not a lot of work to write kqueue version.

There is now a poll opam package that propose a common interface to kqueue, epoll and their windows equivalent. It is gives access to the full possibility of epoll htat would be the best solution.

Can you check is poll is succesfully installable via opam on OS X ?

Cheers, Christophe

David Sancho @.***> writes:

Found polly relies on conf-linux-libc-dev since they are bindings for the Linux epoll system call. Any chance to use kqueue (https://github.com/anuragsoni/kqueue-ml) in Mac or another solution?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

-- Christophe Raffalli web: https://raffalli.eu

craff commented 2 months ago

Hello again,

I just checked poll, it does not give access to all properties I need from epoll. So the only way it to write a version of Async.ml for kqueue.

If you want to do it, I would help you, I think it is not a lot of work. I could even propose a first verstion that you could test ?

Cheers, Christophe

David Sancho @.***> writes:

Found polly relies on conf-linux-libc-dev since they are bindings for the Linux epoll system call. Any chance to use kqueue (https://github.com/anuragsoni/kqueue-ml) in Mac or another solution?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

-- Christophe Raffalli web: https://raffalli.eu