Run an OpenGL application on Linux, and nothing more.
I had to add nvidia_drm.modeset=1
as a kernel commandline parameter. On Arch this was done by editing /boot/loader/entries/arch.conf
.
https://gitlab.freedesktop.org/mesa/kmscube
https://github.com/dvdhrm/docs/tree/master/drm-howto
https://zamundaaa.github.io/wayland/2023/03/10/porting-away-from-gbm-surface.html
https://github.com/nyorain/kms-vulkan#what-are-egl-and-gbm
https://github.com/CuarzoSoftware/SRM
https://github.com/rust-windowing/winit/pull/2272
Development can take place much faster if you develop in your local environment, and run/test on a remote machine without X11 or Wayland.
It's also necessary if you're developing on a non-linux platform, as libdrm and others are highly linux-specific.
I (bschwind) am currently using Sublime Text with this remote setup:
rsync
on both your local machine and the target remote machineRsync SSH
sublime package with your target machine's hostname, repo location, etc. My config looks like this:``` { "folders": [ { "path": "/Users/brian/projects/tonari/just-gl", } ], "settings": { "rsync_ssh": { "excludes": [ ".git*", "_build", "blib", "Build" ], "options": [ "--delete" ], "remotes": { "/Users/brian/projects/tonari/just-gl": [ { "command": "rsync", "enabled": 1, "excludes": [ ], "options": [ ], "remote_host": "tonarchi-test-machine.tonari.wg", "remote_path": "/home/tonari/projects/just-gl", "remote_port": 22, "remote_post_command": "", "remote_pre_command": "", "remote_user": "tonari" } ] }, "sync_on_save": true } }, } ```
~/.ssh/authorized_keys
cargo watch
(cargo install cargo-watch
) to run a command which will execute every time files change on the file system (which happens every time you save files on your local machine, thanks to rsync):
$ cargo watch -x 'clippy --all-targets -- -D warnings'
cargo watch
)