compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

IoBuf should be a unsafe trait #220

Closed Sherlock-Holo closed 7 months ago

Sherlock-Holo commented 7 months ago

https://github.com/compio-rs/compio/blob/master/compio-buf/src/io_buf.rs#L11

the trait user can't guarantee https://github.com/compio-rs/compio/blob/master/compio-buf/src/io_buf.rs#L16 ptr is valid, but implementer know how to make sure the ptr is valid