Normally, the compositor can only run on Linux. By leveraging the power of Docker, it could also be debugged on other operating systems. If you're on Windows or MacOS, use this guide to test or debug the compositor.
To use devcontainer, you need the following:
- Docker
- VSCode
In addition, you will need a xserver to display the compositor.
If you are using NVim, you might need to install and launch NVim in the container manually. Efforts are being made to make this process more automatic.
MacOS
You need XQuartz:
brew install --cask xquartz
and you need to allow docker to access XQuartz by
- Open XQuartz
- Open settings (through menubar or
cmd
+,
) - Go to security
- Enable
Allow connections from network clients
Windows
Hi, Frox here. I don't use Windows, so I would really appreciate if someone can help me with this part of the guide.
Linux
You probably already have xhost, so run the following command to allow docker to access xhost:
xhost +local:
If xhost is not found, you need to install it:
Ubuntu and Debian:
sudo apt-get install x11-xserver-utils
CentOS and Fedora:
sudo dnf install xorg-x11-xauth
Arch Linux:
sudo pacman -S xorg-xhost
- Open the compositor project in VSCode.
- Open command and search for
Dev Containers: Reopen in Container
- Installation and configuration will start automatically
- Enjoy!
Now if you want to run the compositor, running cargo run
should in theory just run. That, however, may have some compatibility issues. Happy coding!