Skip to content
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

Start the compositor side of the book #9

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

i509VCB
Copy link
Member

@i509VCB i509VCB commented Aug 15, 2021

I guess we may as well get the book on the road, Ive got what is effectively an empty compositor setup for the first page.

Forgot to commit this...
@i509VCB
Copy link
Member Author

i509VCB commented Aug 23, 2021

Bringing this back to a draft, I should probably rework the pages off EventLoop::run from calloop.

@i509VCB i509VCB marked this pull request as draft August 23, 2021 16:30
@elinorbgr
Copy link
Member

elinorbgr commented Aug 24, 2021

Also, now calloop itself has a book/tutorial : https://smithay.github.io/calloop/ So it can make sense to reference it from the Smithay book rather than duplicate the content.

The content of the calloop book are in calloop's git repo btw.

@Eskpil
Copy link

Eskpil commented Oct 3, 2021

Is there any new progress here? I am a wayland noob looking too write my own compositor in rust, very hooked on doing it with Smithay. But i am struggeling too learn how all the pieces work together.

@i509VCB
Copy link
Member Author

i509VCB commented Oct 3, 2021

Been busy with a pull request in smithay recently. So I haven't had time to prioritize this specific pull request.

@i509VCB
Copy link
Member Author

i509VCB commented Oct 3, 2021

At the moment if you need guidance, looking at anvil and joining irc or matrix would be best :)

@Eskpil
Copy link

Eskpil commented Oct 3, 2021

yeah, i should probably keep trying too read the source code off anvil. Will get myself on the Matrix. Thanks!

@PolyMeilex
Copy link
Member

PolyMeilex commented Oct 3, 2021

Is there any new progress here? I am a wayland noob looking too write my own compositor in rust, very hooked on doing it with Smithay. But i am struggeling too learn how all the pieces work together.

You should join Smithay's matrix/irc, I'm sure everyone will be happy to help you one the way.
You can also use existing projects as reference like: Anvil, Drakulix's Fireplace or My Anodium (none of them are production ready / usable, but at least can be used as a reference)

@Eskpil
Copy link

Eskpil commented Oct 3, 2021

Just joined the matrix chat. Bookmarked your wm, so i will surely copy paste some code from it sometime, lol.

@i509VCB i509VCB marked this pull request as ready for review October 14, 2021 23:59
@heavyrain266
Copy link

heavyrain266 commented Dec 14, 2021

Is there any new progress here? I am a wayland noob looking too write my own compositor in rust, very hooked on doing it with Smithay. But i am struggeling too learn how all the pieces work together.

I suggest catacomb to be used as reference, it's created by alacritty's author, and codebase is relatively small and less complex than every other compositor mentioned above. (thats what I'm using as refernce for empty yet kerastes).

@i509VCB
Copy link
Member Author

i509VCB commented Dec 14, 2021

Yep we have talked to @chrisduerr on matrix while catacomb was being in early stages and still to today.

However this issue has been put to the side until the rework of wayland-rs is complete.

Regarding catacomb for documentation reference, it is different from other compositors, descendants of anvil, however it has other issues, namely GPL which is not going to be suitable for reference in the book unless chrisduerr signs off on allowing us to reference catacomb for the book.

Plus I also have my own compositor in the works which is not a direct descendant of anvil and I do think we will need to redesign anvil as a result of the wayland-rs rework.

@chrisduerr
Copy link

chrisduerr commented Dec 14, 2021

Regarding catacomb for documentation reference, it is different from other compositors, descendants of anvil, however it has other issues, namely GPL which is not going to be suitable for reference in the book unless chrisduerr signs off on allowing us to reference catacomb for the book.

I think most of the code taken in the early commits is almost a verbatim copy from Anvil anyway, just removing stuff that isn't absolutely necessary. So there shouldn't be any issue with just using that as a reference and publishing it under MIT/Apache. I'm fine with smithay using any of the code before the license was added to help out, the first commit is likely the most useful one for minimal examples though.

Either way things will likely have to be rephrased a bit, at which point I'm not sure any specific compositor will be of much use for more than a rough reference.

The best "type" of behavior for an example would likely just be a Kiosk, since that gets rid of all the compositor-specific window management subjects.

@heavyrain266
Copy link

I have experience with some wlroots and now pure libwayland++, I have created private 32k loc vulkan compositor with it but even that makes it hard (at least for me) to switch from C++ implementation of protocol and start writing new and open source one in pure Rust. My first ever compositor was was written in first versions of Smithay 2,5 year ago but we all know how is this library today.

@i509VCB i509VCB marked this pull request as draft February 20, 2022 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants