▲ | JoshTriplett 5 days ago | |||||||
I think the right way to build a safe interface around io_uring would be to use ring-owned buffers, ask the ring for a buffer when you want one, and give the buffer back to the ring when initiating a write. | ||||||||
▲ | pingiun 5 days ago | parent | next [-] | |||||||
This is something that Amos Wenger (fasterthanlime) has worked on: https://github.com/bearcove/loona/blob/main/crates/buffet/RE... | ||||||||
▲ | Tuna-Fish 5 days ago | parent | prev [-] | |||||||
This works perfectly well, and allows using the type system to handle safety. But it also really limits how you handle memory, and makes it impossible to do things like filling out parts of existing objects, so a lot of people are reluctant to take the plunge. | ||||||||
|