CleverCloud / kawa

Agnostic representation of HTTP1 and HTTP2, with zero-copy, made for Sōzu.
https://crates.io/crates/kawa
Apache License 2.0
18 stars 2 forks source link

Add ARM support #4

Open PsychicNoodles opened 1 year ago

PsychicNoodles commented 1 year ago

Currently, x86 arch specific instructions are used in a couple utility functions, here and here. I'm trying to run sozu on a Raspberry Pi, so it would be nice to have a version that can build and run there, even if it ends up not benefiting from simd optimizations.

5310 commented 1 year ago

Came to second this. On a brand new Ampere VPS, this is the only thing so far that won't work on ARM.

Wonshtrum commented 1 year ago

I'm sorry, I was in a rush when I merged the "perf" branch and I knew SIMD would cause problems. I will soon contribute again to Kawa (mainly to add the missing h2 parts) and I will put all the SIMD stuff under a feature flag (like I should have done). Sozu will get a corresponding feature to enable or disable SIMD in Kawa.

Wonshtrum commented 1 year ago

SIMD has been moved under a feature flag. It will be tested and ported to Sozu soon.

Wonshtrum commented 11 months ago

I apologize for the delay, the Sozu team and I had to prioritize the development of HTTP2, which led to a longer wait than expected. However, I'm pleased to announce that we've now released kawa 0.6.3. This release includes important bug fixes and introduces the SIMD feature flag. Shortly after that, we also released Sozu 0.15.4, which exposes the SIMD feature flag. I hope Sozu compiles properly on ARM when this feature is disabled (it is enabled by default).

lu-zero commented 2 months ago

maybe would be a good idea to guard it using the right cfg entries instead of a feature?

Wonshtrum commented 2 months ago

Yes, that's also our goal. I don't like the way parsing is handled presently. The fast parsers and simd were an afterthought and it shows. Our efforts are currently on the http2 support, which is much more complex than we anticipated. Kawa might be rewritten altogether when we are sure to understand exactly how we want it to work.