You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems unlikely to me that this could be done with reasonable effort. You'd need pyronyx to ship the Vulkan SDK which it doesn't do, and I think same thing for each other dependency that is a binding of a C library.
Now as someone says in the discussion some -sys crates already do ship the shared libraries they depend on, maybe we could take inspiration for making a PR to pyronix. But this would have to be dealt with case-by-case on every bindings crate.
If what you want is to build pomme-client with a single command, Nix can easily do that, managing all dependencies transparently and without installing them on your system, and has been made for the purpose. You can:
Get into a shell with all dependencies downloaded and environment variables (such as VULKAN_SDK) set, so then you cargo build and it just works: Add Nix shell #868
It is very flexible too so you can easily do every middleground between these options as well (define a package but manually run its phases outside the sandbox, build the package from your local Pomme source, build the package but with your own patched dependencies...) thanks to overrides.
It has its quirks too, Nix expects its store to be at /nix/store so you need to either (a) install it as root, (b) have shared namespaces enabled in your kernel, (c) set a different store directory at the risk of invalidating all existing caches and thus needing to build everything.
There might be other options out there with the same purpose but not that I know of. Anyway, it seems easier to use a package manager rather than just cargo.
EDIT: As for other similar options, Conan and other C/C++ package managers definitely look worth investigating. They're not intended at being a system-wide package manager so might not have the quirks of Nix, and we might be able to interact with them from Rust, effectively making it possible to install all dependencies and build with a single cargo command.
The reason is xorg/system depends on them and Conan only provides header files for X11 libraries, because supposedly it works better using the system's libraries and a majority of users expect their system libraries to be used. See conan-io/conan#16483
Now these libraries might be installed by default on a lot of distros? It wasn't available right away on my side because I use NixOS but maybe it wouldn't be so much of an issue for most people.
I does, however, make you not have to install the Vulkan SDK and shaderc.
I've also tried vcpkg and couldn't get it to work yet but looks promising. It lacks udev but has dbus, Vulkan, shaderc, and seems to have xorg libraries. However I don't know how it could be integrated given, for example libdbus, is part of a workspace dependency and you can't have a workspace-wide build.rs (I think?).
Okay I think I've figured out what the issue exactly is.
In order to tell pyronyx where the Vulkan SDK is, I need to set the VULKAN_SDK environment variable. However, each build.rs runs in its own process so setting an env variable there doesn't change anything, and using cargo::rustc-env only sets it for the compiler, not the build script of pyronyx.
The same applies for other dependencies like libdbus-sys or libudev-sys, I would need to set PKG_CONFIG_PATH.
It works if I set these in my shell session, but I can't do that from a build script, so I still need to set up my environment before running cargo build.
The hard part is not downloading the libraries and setting the environment but communicating it to a dependency's build script from our build script.
Again, it could work by patching the dependency but it would add a maintenance burden.
However it should be relatively easy to add a script / support a package manager to run before cargo build that downloads all dependencies (from vcpkg?) in a directory and sets the appropriate environment variables for the native libraries to be found, without installing them system-wide.
cargo install from crates.io won't happen: crates.io doesn't allow git deps or [patch], and we pin azalea by git rev and patch azalea-block. Every workspace crate would also need publishing, the SteelMC submodule included
If you don't want to install anything, grab a release build
For building from source, we can cut native deps instead and ship precompiled SPIR-V so shaderc and the Vulkan SDK aren't needed to build and bundle OpenAL.
Activity
marie-bnl commentedon Nov 4, 2026
This discussion seems relevant: https://users.rust-lang.org/t/is-cargo-feasible-as-a-more-general-purpose-package-manager/11067/6.
It seems unlikely to me that this could be done with reasonable effort. You'd need
pyronyxto ship the Vulkan SDK which it doesn't do, and I think same thing for each other dependency that is a binding of a C library.Now as someone says in the discussion some
-syscrates already do ship the shared libraries they depend on, maybe we could take inspiration for making a PR topyronix. But this would have to be dealt with case-by-case on every bindings crate.If what you want is to build
pomme-clientwith a single command, Nix can easily do that, managing all dependencies transparently and without installing them on your system, and has been made for the purpose. You can:VULKAN_SDK) set, so then youcargo buildand it just works: Add Nix shell #868pomme-clientfrom source with a singlenix-build: pomme-client, pomme-launcher: init NixOS/nixpkgs#554124It is very flexible too so you can easily do every middleground between these options as well (define a package but manually run its phases outside the sandbox, build the package from your local Pomme source, build the package but with your own patched dependencies...) thanks to overrides.
It has its quirks too, Nix expects its store to be at
/nix/storeso you need to either (a) install it as root, (b) have shared namespaces enabled in your kernel, (c) set a different store directory at the risk of invalidating all existing caches and thus needing to build everything.There might be other options out there with the same purpose but not that I know of. Anyway, it seems easier to use a package manager rather than just cargo.
EDIT: As for other similar options, Conan and other C/C++ package managers definitely look worth investigating. They're not intended at being a system-wide package manager so might not have the quirks of Nix, and we might be able to interact with them from Rust, effectively making it possible to install all dependencies and build with a single cargo command.
marie-bnl commentedon Nov 4, 2026
So I've made a
conanfile.txt.And I've run
conan install. The issue is I still had to install all these libraries on my system.The reason is
xorg/systemdepends on them and Conan only provides header files for X11 libraries, because supposedly it works better using the system's libraries and a majority of users expect their system libraries to be used. See conan-io/conan#16483Now these libraries might be installed by default on a lot of distros? It wasn't available right away on my side because I use NixOS but maybe it wouldn't be so much of an issue for most people.
I does, however, make you not have to install the Vulkan SDK and shaderc.
I've also tried vcpkg and couldn't get it to work yet but looks promising. It lacks udev but has dbus, Vulkan, shaderc, and seems to have xorg libraries. However I don't know how it could be integrated given, for example
libdbus, is part of a workspace dependency and you can't have a workspace-widebuild.rs(I think?).marie-bnl commentedon Nov 4, 2026
Okay I think I've figured out what the issue exactly is.
In order to tell
pyronyxwhere the Vulkan SDK is, I need to set theVULKAN_SDKenvironment variable. However, eachbuild.rsruns in its own process so setting an env variable there doesn't change anything, and usingcargo::rustc-envonly sets it for the compiler, not the build script ofpyronyx.The same applies for other dependencies like
libdbus-sysorlibudev-sys, I would need to setPKG_CONFIG_PATH.It works if I set these in my shell session, but I can't do that from a build script, so I still need to set up my environment before running
cargo build.The hard part is not downloading the libraries and setting the environment but communicating it to a dependency's build script from our build script.
Again, it could work by patching the dependency but it would add a maintenance burden.
However it should be relatively easy to add a script / support a package manager to run before
cargo buildthat downloads all dependencies (fromvcpkg?) in a directory and sets the appropriate environment variables for the native libraries to be found, without installing them system-wide.Purdze commentedon Nov 4, 2026
cargo install from crates.io won't happen: crates.io doesn't allow git deps or [patch], and we pin azalea by git rev and patch azalea-block. Every workspace crate would also need publishing, the SteelMC submodule included
If you don't want to install anything, grab a release build
For building from source, we can cut native deps instead and ship precompiled SPIR-V so shaderc and the Vulkan SDK aren't needed to build and bundle OpenAL.
After that, cargo install --git https://github.com/PommeMC/Client pomme-client should work with just Rust on Windows/macOS. Linux still needs dbus/udev dev packages. Nix users have #868