tokio-rs / io-uring

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

feat: allow uring builder to customize flags/features #264

Closed bychjzh closed 5 months ago

bychjzh commented 5 months ago

Currently, users cannot directly customize the flags and params of the uring builder, and with the rapid iteration of io_uring in the kernel, many new features will not be compatible with existing applications. So we need to provide more flexibility in the uring builder to allow customization of flags and params.

quininer commented 5 months ago

I don't think this is as useful as you might think, since many setup are not enough to just change .flags, and it doesn't make sense to change .features.

bychjzh commented 5 months ago

As an example, when I wanted to add the FEAT_FAST_POLL feature, there was no way I could add it to the original code.

quininer commented 5 months ago

You may have misunderstood the feature field, it is not a parameter that you need to set, but you can use this field to check if the currently used kernel supports fast poll feature.

bychjzh commented 5 months ago

Thanks for the heads up, have verified that I did misunderstand here.