Intro

I’ve started playing with Rust and after a few weeks, with a good grasp of
basics, I’ve been looking for a bigger project to dig around and learn. Beside
popular projects like Alacritty and
Xi I’ve found
wtftw - a tiling window manager written
completely in Rust!.

It seemed to be stable somehow work, so I’ve decided to switch from my old
i3 configuration to it. At the time, the latest change was commited on Sep 19,
2017 and the README mentioned compilation against Rust 1.2.0+ (1.2.0 has been
released on Aug 7, 2015, long long time ago), so I had a few problems with
building it with 3 years older compiler/dependencies, hence this post.

Compiling master branch

The first problem were outdated dependencies, which was trivial to fix with cargo:

$ cargo update

then, after running cargo build I was able to run it under
Xephyr (see also WTFTW’s README) and,
finally, outside it:

Custom config

So next, I’ve tried to add more shortcuts to make it more convenient.

README: “take a look at the example config in config/. After the first
start, the config needs to be placed in ~/.wtftw/src/config.rs. Voila.“.

It didn’t work :<. It
seemed that WTFTW haven’t even started… I’ve checked the code and realized
that I should get a proper error message, but… I didn’t have xmessage
installed. After installing it (xorg-xmessage package in Arch Linux), I got
the actual error:

error compiling config module. run 'cargo build' in ~/.wtftw to get more info.

so, run cargo build and then:

error[E0554]: #![feature] may not be used on the stable release channel
--> src/config.rs:1:1
|
1 | #![feature(alloc_jemalloc)]
| ^^^

When you search for it, you’ll most probably reach that page
saying “This feature has been replaced by the jemallocator crate on
crates.io.” I’ve tried to use it, but met another problems with compilation
and I’ve removed it completely. I mean these lines:

#![feature(alloc_jemalloc)]externcrate alloc_jemalloc;

And nothing happened… which turned out to be a bit tricky coincidence:

rustc (I belive) beside libconfig.so generates also libconfig.d file

WTFTW
had
hard-coded only a prefix of the library’s name (which is also described in
this issue):