-
-
Notifications
You must be signed in to change notification settings - Fork 936
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
Add a nix devShell for webapp development #3442
base: main
Are you sure you want to change the base?
Conversation
Is there no option for It would work as a temporary stopgap to allow impure dev env to work, but why not just PR to add a dedicated environment variable or CLI flag for controlling this? Has DioxusLabs already rejected such a solution? |
I agree that the current behavior of The ideal solution would be some sort of envvars to specify wasm-bindgen path, but the exact behavior of the verification process needs to be changed. Although, it just came to me that the proper behavior would be something similar to the rust toolchain itself: |
One problem I ran into is that your metadata is wrong.
Because the package is named I have a fair bit of experience in Nix, so I'd be willing to help develop the flake further if you want. Exposing the local |
Thanks for pointing it out. Originally I was fiddling around with the workspace build mechanism since there are multiple crates in the repo. According to Should be fixed now. |
In addition to the existing nix devShell config, which is for developing
dioxus
itself, this pull request adds aweb
devShell for developing web applications with dioxus.Although
dioxus-cli
is available in nixpkgs, it does not update with main branch and it doesn't integrate well with versioned rust environment (due to the missing or non-functioningrustup
). The new devShell config buildsdx
based on the repo and inserts a mock-uprustup
to bypassdx
's toolchain verification process, allowing it to automatically install the corresponding versionedwasm-bindgen
(I couldn't come up with a better way to make it use awasm-bindgen
provided by the flake, other than wrappingdx
with modified$XDG_STATE_HOME
, which would also interfere with other parts of the program using related envvars).Fixes #3083 (sort of?)