Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Update dependencies (wlroots, bindgen, ...) #300

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

perfah
Copy link

@perfah perfah commented Apr 23, 2020

Hello! Me and gynther-k has worked on updating the dependencies of wlroots-rs. We have included the changes below. As we are mostly beginners when it comes to wlroots we have tried to avoid as much design changes as possible, but it is worth noting that some were unavoidable. It probably needs to be reviewed thoroughly, but we are happy to respond to feedback. :)

Changes included:

wlroots-rs:

wlroots-sys:

  • Update bindgen to 0.53.*
  • Update wayland-commons, wayland-scanner, wayland-server and wayland-sys to 0.25.*
  • Add wayland-client (0.25.*) as a dependency since a required type (AnonymousObject) has been moved there (as of version 0.25)
  • Pull down latest wlroots-submodule
  • Update wlr/types/* included in wlroots-sys/wlroots.h to reflect the latest wlroots submodule

gynther-k and others added 24 commits April 9, 2020 18:42
… of wlroots (under "unstable"-compilation)

- Remove references to "wlr/types/*" header files that are no longer available
- Add references to new "wlr/types/*" header files
- Update wayland-commons = "0.25.*"
- Update wayland-server = "0.25.*"
- Update wayland-scanner = "0.25.*"
- Add wayland-client = "0.25.*" dependency as wayland_commons::AnonymousObject was removed and now only seems available in wayland_client
- Fix for 142 erroneous imports as a result of the updates
- Add "#![allow(unused)]" tag to avoid unnecessary warnings
- Enforce static library creation with meson built-in option 'default_library' in static mode. This fixes issues where libraries like 'wlr_util' are not found. The reason why this is needed is that the meson.build file has been changed in later versions of wlroots.
- Link only with one static library: libwlroots.a

Note that meson-rs does not currently seem to support changing the built-in meson options when building. A workaround has hence been used for the moment.
- Rename functions/variables in alignment with change: "output: refactor frame submission API"

- Workaround for removal of output variables 'lx', 'ly'. Output position is now get/set through wlr_output_layout_get_box(...). See change "output: remove lx, ly".
…rebuild the project unnecessarily

Only changes to the following files will now make the project rebuild:
- src/lib.rs
- src/wlroots.h
- wlroots/
@perfah perfah changed the title wlroots-sys: Update dependencies in cargo.toml Update dependencies (wlroots, bindgen, ...) May 20, 2020
@Timidger
Copy link
Member

This patch looks good. Since I'm not maintaining this though I'd rather do one of the following:

  • hand over write access to this repo to you (would require permission from one of the core sway/wlroots people as well I believe)
  • have this be done in an official fork that I can update the README to point to.

The choice is up to you if you'd like to pursue either.

@perfah
Copy link
Author

perfah commented May 24, 2020

Yeah, I did read your blog posts about that. I am actually kinda curious about the state of this project today. What do you think would be the experience of writing a compositor with it now?

We have already merged this patch into master on our own fork, but whether it qualifies as an official one is another question. Most of my interest has been in updating the wlroots-sys crate only, rather than the complete wlroots-rs project.

I would gladly maintain wlroots-sys (only) in a fork, officially or not.

@Timidger
Copy link
Member

I am actually kinda curious about the state of this project today. What do you think would be the experience of writing a compositor with it now?

Using wlroots-rs as it exists now it would probably get you 30-50% of the way there? Damage tracking was probably never completed, but the essentials (outputs, shells, etc.) were set up enough that you could recreate Way Cooler what it was in 0.8 or so (sans one or two features). The limiting factor is extending it beyond that and the amount of boilerplate one would have to write on the wlroots-rs side to accomplish that and the awkward use of proc macros to smooth over my design.

This version of Way Cooler was the last version before the rewrite to C. You be your own judge of the code quality (in my opinion, dehandle! killed it -- this can be reworked into something that doesn't require a proc macro, but would require a lot of work on wlroots-rs)

wlroots-sys is much easier to maintain, since it's literally just bindings. It would provide value, however I don't think it's tenable as a base for anything. If a compositor was written using just wlroots-sys it's really no better (and in many ways worse) than just using C and wlroots directly.

@Pajn
Copy link

Pajn commented Jul 14, 2020

I also maintain (or, picked up again now after a half year hiatus) a version of wlroots-sys here: https://github.com/Pajn/wlral
I think an official and updated wlroots-sys fork would hold value and I could help maintain it. If there's interest I can extract out wlroots-sys to its own repo (probably based on @perfah's fork as I have made some changes more specific to my use case) and talk to the wlroots people to see if we can host it here.

@perfah
Copy link
Author

perfah commented Jul 31, 2020

Hi @Pajn! This sounds all good to me.

If there's interest I can extract out wlroots-sys to its own repo

If you need assistance you can reach me at perfah@kth.se. I am happy to help with merging/administration of any kind.

I am currently pursuing other stuff, but think this idea is interesting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants