Skip to content

Commit d1a55df

Browse files
authored
Repetition of open-source project (#878)
* Add proposal * Add info about what a crate is * Added Gunnar Applelid to the project * Add containerization paranthesis * Add link to repo * Update open-source links * Update open-source readme for task repetition * Improve accuracy of text * Add instruction on how to initialize submodule
1 parent 03a542f commit d1a55df

File tree

1 file changed

+62
-6
lines changed
  • contributions/open-source/perfah-applelid

1 file changed

+62
-6
lines changed

contributions/open-source/perfah-applelid/README.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# Patching wlroots-sys
22

3+
## Members
4+
1. Per Fahlander ([email protected])
5+
2. Gunnar Applelid ([email protected])
6+
37
## Links to what we did
48
[Repository](https://github.com/perfah/wlroots-rs)
59

610
[Reflection & Contribution document](https://github.com/perfah/wlroots-rs/wiki/devops-course:-Reflection-&-Contributions)
711

8-
## Members
9-
1. Per Fahlander ([email protected])
10-
2. Gunnar Applelid ([email protected])
12+
[Pull request](https://github.com/swaywm/wlroots-rs/pull/300)
13+
14+
[Passing build](https://builds.sr.ht/~timidger/job/214237)
1115

1216
## Proposal
1317
Patch the crate [wlroots-sys](https://github.com/swaywm/wlroots-rs/tree/master/wlroots-sys) belonging to the deprecated [wlroots-rs](https://github.com/swaywm/wlroots-rs) (rust bindings for [wlroots](https://github.com/swaywm/wlroots)) library to suit it for use in other projects directly.
@@ -35,11 +39,11 @@ Some suggestions for tangible changes to the crate:
3539
- Add a README / documentation page
3640

3741

38-
## Motivation
42+
### Motivation
3943

4044
The project was deprecated due to the author giving up on it. There is however interest in the the project (see stars on GitHub) since the project (including it's subcrates) is a useful resource for developing Wayland-compositors in the Rust-language. Patching wlroots-sys would make it possible to interface with the wl-roots c-library directly without dependencies to deprecated bindings.
4145

42-
## Ties to DevOps
46+
### Ties to DevOps
4347

4448
The project would involve the following:
4549

@@ -50,7 +54,7 @@ The project would involve the following:
5054
- Making it as **self-contained** as possible (containerization)
5155

5256

53-
## Context
57+
### Context
5458

5559
- Rust: a programming language
5660

@@ -63,3 +67,55 @@ The project would involve the following:
6367
- wlroots-rs: A deprecated library with Rust-bindings for Wlroots.
6468

6569
- wlroots-sys: A deprecated library within wlroots-rs that offers auto-generation of "raw" bindings from C to Rust.
70+
71+
72+
## Project: wlroots-sys
73+
74+
A fork intended for standalone use of the wlroots-sys subcrate (that generates "raw" Rust bindings for [wlroots](https://github.com/swaywm/wlroots) via bindgen). This means that the development is contained only within the [wlroots-sys](https://github.com/perfah/wlroots-rs/tree/master/wlroots-sys) directory. Note that this is not an attempt to revive wlroots-rs - hence the largely untouched repository root. The motivation for this fork is the benefit of being able to write Wayland-compositors based on wlroots in Rust without relying on outdated protocols, dependencies etc.... See below if you are interested in writing one yourself.
75+
76+
### Changes
77+
78+
The following changes have been merged into master:
79+
80+
- Exposed (updated to reflect) all wlr/protocols currently available [here](https://github.com/swaywm/wlroots/tree/master/protocol)
81+
- Exposed (updated to reflect) all wlr/types currently available [here](https://github.com/swaywm/wlroots/tree/master/types)
82+
- Updated all dependencies of wlroots-sys to the current versions (including the library suite “wayland-rs” to >=0.25.*)
83+
- Fixed a bug where wlroots-sys would not compile. The multi-crate issue is described [here](https://users.rust-lang.org/t/unable-to-compile-syntex-syntax-using-rust-1-41/37710).
84+
- Fixed a bug where the wlroots-sys crate would recompile every time you compile another crate that depends on wlroots-sys
85+
- Added informative dependency checks as well as more constructive error messages for pkg-config when building default, static and unstable, for a smoother build process.
86+
- Fixed errors with static build with new version of wlroots.
87+
- Compatibility changes for wlroots-rs (makes CI pass)
88+
89+
### Usage
90+
91+
1. `git clone https://github.com/perfah/wlroots-rs.git`
92+
2. `cd wlroots-rs`
93+
3. `git submodule update --init`
94+
4. `cp ./wlroots-sys <path_to_your_project>/wlroots-sys`
95+
5. Include a crate dependency to your project's `cargo.toml`-file:
96+
97+
[dependencies]
98+
wlroots-sys = { path = "wlroots-sys", features = [...] }
99+
6. Replace "..." with the optional dependencies you would like.
100+
101+
### Dependencies
102+
103+
- Required dependencies:
104+
105+
meson
106+
wayland
107+
wayland-protocols
108+
EGL
109+
GLESv2
110+
libdrm
111+
GBM
112+
libinput
113+
xkbcommon
114+
udev
115+
116+
- Optional dependencies (that can be added as features):
117+
- `systemd` - support for logind
118+
- `elogind` - support for logind without systemd installed
119+
- `libcap` - capabilities
120+
121+

0 commit comments

Comments
 (0)