envoy / Embassy

Super lightweight async HTTP server library in pure Swift runs in iOS / MacOS / Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About Linux support

felix91gr opened this issue · comments

This project is awesome ✨ . Right now we are testing at SourceKittenDaemon if we can replace Vapor with Embassy. Embassy makes a lot of sense for our use case, since it's lightweight and thus, much more suited for a local daemon like SKD.

But we're also researching porting SKD to Linux. I've been testing our dependencies, and Embassy's KqueueSelector isn't built there, which gives us a compiler error because SKD uses it. The commit that included this line tells me that that's why it isn't built.

I must ask for your advice, then: do you think we can avoid using KqueueSelector? And if not, are there plans for supporting it under Linux?

Thank you so much ^^
-- Félix

Linux's possible replacements for KqueueSelector's Darwin dependencies

Here I'll post everything I find that could be useful for Linux support of the KQSelector

@felix91gr

Hi fleix,

Thank you for liking this project. KqueueSelector was meant to be used for BSD OS, like FreeBSD, which iOS happened to based on it. For Linux, you can use SelectSelector.

There is actually an example project for running under Linux we built

https://github.com/envoy/example-embassy

and you can see how we use SelectSelector there

https://github.com/envoy/example-embassy/blob/master/main.swift

Oh, indeed! :D
Thank you for pointing that out. Even the APIs are the same ✨

I hope we can show you soon a release of SKD that supports Linux whilst using in part, Embassy ^u^