tokio-rs / io-uring

The `io_uring` library for Rust
Apache License 2.0
1.16k stars 129 forks source link

discussion: Why not bind liburing and instead use system calls directly? #298

Closed MrCroxx closed 3 weeks ago

MrCroxx commented 4 weeks ago

Hi, thanks for the work to provide a rust API for io_uring. I have some questions on the trade-offs of some design decisions. The github discussion is not enabled, so I ask here.

May I ask why this lib does not bind liburing and instead uses system calls directly? IMO, there are a lot of duplicated functions between them. Binding liburing can be much easier and well-tested.

Would you like to share more context about it?

quininer commented 4 weeks ago

Using liburing will make our API limited by liburing's API. for example, our current opcode abstraction is hard to construct on top of liburing. and pure Rust code has many benefits in build, analysis and performance, without having to worry about toolchains and compilation parameters of C.