armanbilge / fs2-io_uring

they see me ringin'
Apache License 2.0
52 stars 7 forks source link

Ship with vendored liburing #62

Open lolgab opened 1 year ago

lolgab commented 1 year ago

Can we ship a jar containing the c sources for liburing so the Scala Native tools can compile it together with applications and users don't need to install/configure anything? I'm not sure it is possible. Would you accept such a PR? I can be a build script which adds liburing files to managed resources.

armanbilge commented 1 year ago

Yes, it's an interesting idea, and a very plausible one!! I am definitely interested in it, it would make it much easier to use this library :)

I can be a build script which adds liburing files to managed resources.

I'd have to see how this works, but if it's robust and we are not sacrificing any performance trying to compile it ourselves then it seems good.

Along those lines, I wonder if we should offer it as a separate opt-in/opt-out jar, so if someone wants to do it themselves that's still an option. (Btw, would be interesting if we can do this for s2n-tls as well, but that's another story)

One more note: another option would be if we could remove the liburing dependency altogether. One of the GSoC projects is calling io_uring from Java, which can't using liburing because the cost of JNI is so high. So it will be implementing all of the helpers in Scala. In theory we could re-use that work here and drop the liburing dependency completely. But also I watched a talk from Jens Axboe where they say "don't be a hero, use liburing" lol 😅