-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use BorrowedFd
for requests/events instead of RawFd
#592
Comments
Yes, this lifetime constraint is the exact reason why I left the |
I guess this is something for 0.31.0, by which point wayland-rs's Rust MSRV will probably be new enough to use GATs. |
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 13, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 13, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 13, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 14, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 14, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 14, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65. Currently `wayland-client` compiles here, but server-side needs the same changes, and things need to be cleaned up a bit.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 26, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 26, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Jul 26, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65.
ids1024
added a commit
to ids1024/wayland-rs
that referenced
this issue
Sep 1, 2023
Implementation of Smithay#592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65.
elinorbgr
pushed a commit
that referenced
this issue
Sep 2, 2023
Implementation of #592. This is required for IO safety. Or perhaps `AsFd` generics would be useful. This will be a breaking API change, and require Rust 1.65.
This is now done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently events a client receives with an fd use
OwnedFd
, while events the client sends useRawFd
. In server code it's the same but reversed.As a result of this, functions like
WlShm::create_pool
violate IO safety rules since the function takes and operates on aRawFd
, but the function is not markedunsafe
.This should instead use a
BorrowedFd
, but this is complicated from a lifetime perspective. I thinkwayland_client::Proxy
'sRequest
andwayland_server::Resource
'sEvent
would need to use GATs generic over a lifetime? This isn't possible as long as wayland-rs targets Rust < 1.65.0 though.The text was updated successfully, but these errors were encountered: