Could you add some options to add common dependencies like the ones for winit or tauri, iced, bevy1, etc.?
It's be great to have a single source of truth for stuff like this that's a hard thing for Nix users and newcomers.
Examples include:
vulkan-loader must be in LD_LIBRARY_PATH for Vulkan (used in wgpu, and through that GUI libraries) to work
libGL (not libglvnd directly, which breaks Darwin and Android support) must be in buildPackages for OpenGL to work
- libxkbcommon, Wayland, and Xorg packages must be in
LD_LIBRARY_PATH for Winit to work
fontconfig and freetype are often used in GUI libraries
Could this even be automatic by reading Cargo.lock?
Could you add some options to add common dependencies like the ones for
winitortauri,iced,bevy1, etc.?It's be great to have a single source of truth for stuff like this that's a hard thing for Nix users and newcomers.
Examples include:
vulkan-loadermust be inLD_LIBRARY_PATHfor Vulkan (used in wgpu, and through that GUI libraries) to worklibGL(not libglvnd directly, which breaks Darwin and Android support) must be inbuildPackagesfor OpenGL to workLD_LIBRARY_PATHfor Winit to workfontconfigandfreetypeare often used in GUI librariesCould this even be automatic by reading Cargo.lock?
Footnotes
Specifying
env.RUSTFLAGS = "-C link-arg=-fuse-ld=lld";through Nix may be a better way than through.cargo/config.tomlso that all contributors without Nix aren't forced into using LLD, and it keeps LLD innativeBuildInputsnear the code that makes Rust use it. Also, (big one): you don't need templates to do this that can go obsolete after applying them!!!! Adding-Zshare-generics=yon nightly? ↩