-
-
Notifications
You must be signed in to change notification settings - Fork 947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo.lock for dioxus-cli is outdates #3083
Comments
I can reproduce this as well on my machine
|
I had this on ArchLinux but running |
Found the exact same problem on my nixos system, haven't found any declarative solutions yet |
We keep the wasm bindgen version unlocked so that it updates to match other dependencies in the ecosystem that pull in the latest version of wasm bindgen like web-sys. You can fix this issue by reinstalling the CLI with |
It should be added that you also have to add $HOME/.cargo/bin to path |
It seems that
Also, I'm curious if someone is able to setup a full flake-based devShell for dioxus, as all the solutions available now seem to be reliant on |
@j4ger i'm no expert, but i have tried in the previous versions with the following flake and did not work: {
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
rust-overlay,
flake-utils, ...
}: flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
custom-wasm-bindgen-cli = pkgs.wasm-bindgen-cli.override {
version = "0.2.95";
hash = "sha256-DDdu5mM3gneraM85pAepBXWn3TMofarVR4NbjMdz3r0=";
cargoHash = "sha256-birrg+XABBHHKJxfTKAMSlmTVYLmnmqMDfRnmG6g/YQ=";
};
custom-dioxus-cli = pkgs.dioxus-cli.overrideAttrs (oldAttrs: rec {
version = "0.6.0";
src = pkgs.fetchCrate {
pname = "dioxus-cli";
version = "0.6.0-alpha.0";
hash = "sha256-XbX/sg9HPKhH+VN6x4wMhPW9fZw+3jap6l8oNsCB0HQ=";
};
cargoHash = "";
});
in
{
devShells.default = pkgs.mkShell {
nativebuildInputs = [
pkgs.openssl
];
shellHook = ''
export PKG_CONFIG_PATH=${pkgs.openssl.dev}/lib/pkgconfig
'';
packages = [
pkgs.zlib
# pkgs.wasm-bindgen-cli
# custom-wasm-bindgen-cli
# pkgs.dioxus-cli
# custom-dioxus-cli
toolchain
pkgs.nodejs_23
] ++ (with pkgs.nodePackages; [ prettier tailwindcss ]);
};
}
);
} ./rust-toolchain.toml being : [toolchain]
channel = "stable"
profile = "default"
targets = ["wasm32-unknown-unknown", "aarch64-apple-darwin", "x86_64-unknown-linux-gnu"] i have been using this and upgrading it forever with also using direnv: ./.envrc being : watch_file *.nix rust-toolchain.toml
export WEBKIT_DISABLE_COMPOSITING_MODE=1
export PATH=$HOME/.cargo/bin:$PATH
# export OPENSSL_DIR=$(dirname $(whereis openssl | awk '{print $2}')) # doesn't work since openssl binary path is not the same as the one required
use flake i should later integrate these exports into my flake I hope this helps someone find a way to make it fully work without the need for manually having to use cargo or just make its life easier for using dioxus. |
Thank you for this, I need to fix our nix flake but am/was unsure how to go about it. |
After digging into the source of Also, just for the clarification, the current |
Would there be any way of doing this without the use of rustup? it is not best for usage in flakes |
I've created a PR here: #3442 While it is under review, you can tryout my fork first. I made a mockup Although the "nix-way" to do this would be to include a build of |
Problem
Some packaging tools like nix use Cargo.lock to pick up versions of the dependencies. Currently dioxus-cli Cargo.lock uses 0.2.93 webasm-bindgen but rest of Dioxus uses 0.2.95 version of bindgen.
Steps To Reproduce
Steps to reproduce the behavior:
dx serve
Expected behavior
Sample application runs
Actual behaviour
dx
fails due to mismatch of versionsEnvironment:
The text was updated successfully, but these errors were encountered: