9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Dave MacFarlane <driusan@driusan.net>
To: 9front@9front.org
Subject: Re: [9front] Thoughts on Wayland?
Date: Mon, 05 Aug 2024 07:27:25 +0900	[thread overview]
Message-ID: <18086054-9E8B-42C8-8AB0-30F8C3B276AB@driusan.net> (raw)
In-Reply-To: <d7b9eadd-c2b5-444a-821b-c72991ef532f@howhill.com>

On August 5, 2024 4:26:10 a.m. GMT+09:00, Willow Liquorice <willow@howhill.com> wrote:
>Hello again 9front,
>
>(Warning: long email is long)
>
>I've been leafing through the Wayland protocol, comparing it to rio and /dev/draw. To me, a system that could speak Wayland sounds much more compatible with the wider software ecosystem.
>
>Has there been much thought put into Wayland in 9front? I'd poke around in the list archives, but I haven't figured out how to 9P on my Linux machine yet.
>
>Here are my thoughts:
>
>1. The Wayland compositor and clients talk to each other over a Unix domain socket. I'm guessing Plan 9 doesn't have those (and doesn't want them) as there's nothing in sys/man on the subject. Could pipe(3) do the trick?
>
>2. Shared memory (where wl_buffers are stored) is achieved by passing a file descriptor from the client to the compositor, which the compositor mmaps as needed.
>
>If I understand correctly, that already sounds pretty plan9-y, though I'm not sure whether you could then treat the file *like* shared memory under 9front. Again, couldn't find any references to "mmap" in the manuals, so I guess there's no direct analogue. Could you achieve the same (or similar) effect with a ramfs?
>
>3. protocol/wayland.xml is apparently used to generate all of the function prototypes you need to speak Wayland. If the underlying components (shared memory and a domain socket lookalike) work, making a Wayland library for Plan 9 (Way 9?) *might* boil down to a paint-by-numbers exercise.
>
>Wayland's been around a while, so maybe none of these observations are new. I don't know! I'm a novice.
>
>Regards,
>	Willow
>

What is your goal?

If you want to learn about /dev/draw and Wayland trying to port Wayland for yourself is an ambitious goal but you would learn a lot.

If you want to improve the architecture replacing a Plan 9 solution for graphics with a Linux one is of dubious value.

If you want to make it easier to port software you're trying to run before you walk. Anything that uses Wayland almost certainly needs all kinds of other Linux-specific libraries or modern C extensions or LLVM or etc and you'd get more value working on APE* and starting with something more concrete (a specific, preferrably small, program you'd like to port.)

* I am not sure if 9front is really interested in a more complete APE, having just removed ape/diff.. I'd suggest reaching out to the Harvey people since this idea is more up their lane but I think Harvey is dead. 

- Dave

  parent reply	other threads:[~2024-08-04 22:31 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 19:26 Willow Liquorice
2024-08-04 19:44 ` Stuart Morrow
2024-08-04 19:49   ` Willow Liquorice
2024-08-04 19:54   ` Eli Cohen
2024-08-04 19:59     ` Eli Cohen
2024-08-04 20:04       ` Eli Cohen
2024-08-04 20:05         ` Eli Cohen
2024-08-04 20:09         ` Willow Liquorice
2024-08-04 20:29           ` Eli Cohen
2024-08-04 21:23           ` ori
2024-08-04 21:43             ` ori
2024-08-04 22:00               ` David Leimbach
2024-08-04 22:22                 ` ori
2024-08-04 22:42                   ` David Leimbach
2024-08-04 22:57                     ` ori
2024-08-04 21:10       ` Willow Liquorice
2024-08-04 21:24         ` ori
2024-08-04 21:25         ` Eli Cohen
2024-08-05  8:13         ` Willow Liquorice
2024-08-05  8:29           ` ori
2024-08-05  8:52             ` sirjofri
2024-08-05  8:57               ` Noam Preil
2024-08-05  9:12                 ` sirjofri
2024-08-05 11:51                 ` hiro
2024-08-05  9:03               ` Willow Liquorice
2024-08-05 11:05               ` Shawn Rutledge
2024-08-05 12:01                 ` hiro
2024-08-05 12:26                 ` sirjofri
2024-08-05 11:15               ` David Arnold
2024-08-05 11:47               ` hiro
2024-08-05 12:35                 ` sirjofri
2024-08-04 20:01     ` Willow Liquorice
2024-08-04 21:23       ` sirjofri
2024-08-04 20:08     ` mkf9
2024-08-04 20:35       ` Willow Liquorice
2024-08-04 20:32 ` Pavel Renev
2024-08-04 21:31 ` ori
2024-08-05  6:09   ` Noam Preil
2024-08-05  8:02     ` hiro
2024-08-05 11:51       ` Shawn Rutledge
2024-08-06 16:37         ` hiro
2024-08-06 17:57           ` sirjofri
2024-08-07  9:27           ` Steve simon
2024-08-07 11:47             ` hiro
2024-08-05 12:54   ` Willow Liquorice
2024-08-05 13:13     ` [9front] Fortune worthy Steve simon
2024-08-05 20:06     ` [9front] Thoughts on Wayland? Jon Sharp
2024-08-06  0:07       ` Eli Cohen
2024-08-06  0:09         ` Eli Cohen
2024-08-06  1:57           ` Michael Misch
2024-08-06 13:01         ` Emil Tomczyk
2024-08-04 22:27 ` Dave MacFarlane [this message]
2024-08-05  6:10   ` Noam Preil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18086054-9E8B-42C8-8AB0-30F8C3B276AB@driusan.net \
    --to=driusan@driusan.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).