Skylane - implementation of Wayland in Rust

Wojciech Kluczka wojciech.kluczka at gmail.com
Fri May 5 17:49:37 UTC 2017


> Borrowing the idea from Daniel Stone from whom I heard it first, the
> only other option is to reimplement libwayland *including* its C ABI in
> Rust. You need to completely throw away the C implementation of
> libwayland and replace that with your own libwayland-*.so built with
> Rust. Then you will get libEGL calling into your implementation and it
> will be the sole implementation, which should let things work.


This is some solution but it's huge workaround. I would rather use
bindings.



> If you want an EGL driver to
> talk to Wayland, you need the driver and the server to share a C
> implementation of the protocol library.
>

With this approach there either
- has to be the one and only implementation or
- every implementation provides its own stuff to mesa or
- (what I meant in second point in my first message) mesa is generic enough
to be used by any implementation. EGL_WL_bind_wayland_display takes
wl_display and fills wl_buffer_interface and wl_drm_interface with pointers
to functions taking wl_resource in arguments. I can imagine extension which
takes implementation-independent structure and fills it with
implementation-independent functions which can be used to construct (by
server) implementation-dependent wl_drm in Rust, Haskell, or whatever that
talks C ABI.

But...


> Yes, you don't need to use the EGL extension. You can implement wl_drm
> or the dma-buf extension directly in your rust based compositor.


... if so, then I'm more than good with that. I will see what I can do.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170505/c0a6ebfe/attachment.html>


More information about the wayland-devel mailing list