added readme

This commit is contained in:
Yessiest 2022-01-27 03:07:23 +04:00
parent 56194c08a6
commit 3dc6c588c4
1 changed files with 21 additions and 0 deletions

21
include/README.md Normal file
View File

@ -0,0 +1,21 @@
# libwaystub - uhhhhhhhhhh
There was a point in time when attempts at making firefox be compileable with only wayland support brought the issue with a hard runtime dependency on wayland libs even for X users. and that's why this, uh, thing, exists.
# Idea
If there are functions that we want to just omit in the C++ code, we can write stubs for these functions. That approach, surprisingly enough, worked. By simply writing functions that return `NULL` with the names of wayland library functions that firefox expects, we force firefox to believe that wayland libraries are either not existent or wayland isn't running (whichever it is). Despite the absurdity, the approach worked.
# Building
```
mkdir build
cd build
cmake ..
make
```
you should then have libwaystub.so in the build directory. Copy it to wherever you want to apply the stubs, and add the library to `LD_PRELOAD` before launching your application that you want to apply this stub for.
# License
This work is licensed under the MIT-0 license.