Skip to content
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

behavior of dx build has changed to simplify overriding build utilities #1

Closed
crabdancing opened this issue Jan 24, 2025 · 3 comments
Closed

Comments

@crabdancing
Copy link

dioxus-cli can now take a NO_DOWNLOADS=1 environment variable. When you set that, it does not attempt to fetch utilities and can instead be trusted to pull them directly from the local enviornment. That ought to drastically simplify the flake.nix code.

See this PR: DioxusLabs/dioxus#3465

@ToyVo
Copy link
Owner

ToyVo commented Jan 27, 2025

I've updated the flake to use dx 0.6.2 and wasm-bindgen 0.2.100.
I still have an issue with wasm-opt. binaryen is a native input and I've verified its on the PATH when in the buildphase

  99.439s  INFO Compiling [210/229]: dioxus_fullstack
  99.472s  INFO Compiling [211/229]: dioxus_web
  99.484s  INFO Compiling [212/229]: dioxus
 100.404s  INFO Bundling app...
 100.405s  INFO Running wasm-bindgen...
 100.466s  INFO Running optimization with wasm-opt... 
 100.467s ERROR err=Other(Failed to write main executable

Caused by:
    0: I/O Error: No such file or directory (os error 2)
    1: No such file or directory (os error 2)) 
 100.467s ERROR err=Other(Failed to write main executable

@crabdancing
Copy link
Author

crabdancing commented Jan 28, 2025

Oh yeah. I ran into that too. My solution was to build a newer dx (from the git repo) with naersk:

        dx = let
          naersk' = pkgs.callPackage inputs.naersk {};
        in
          naersk'.buildPackage {
            name = "dioxus-cli";
            src = inputs.dioxus;
            cargoBuildOptions = prev: prev ++ ["-p" "dioxus-cli"];
            meta.mainProgram = "dx";
          };

I'm working on a flake-parts module I'd be happy to share down the line.

@ToyVo
Copy link
Owner

ToyVo commented Jan 28, 2025

we know why this happens now DioxusLabs/dioxus#3659 I'm applying the patch in the flake to still use optimizations

@ToyVo ToyVo closed this as completed Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants