Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

How to run? #44

Open
1 task done
magick93 opened this issue Nov 13, 2023 · 1 comment
Open
1 task done

How to run? #44

magick93 opened this issue Nov 13, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@magick93
Copy link

magick93 commented Nov 13, 2023

Problem

I'm trying to find how to run the examples, but it isnt clear.

Steps To Reproduce

TodoMVC

ecommerce-site

The readme says:

Run the following commands to serve the application...

npx tailwindcss -i ./input.css -o ./public/tailwind.css --watch
cargo watch -x 'run --release'

This actually two commands. Each should be run in a new terminal.
However, cargo watch -x 'run --release' results in:

error: no such command: `watch`

        Did you mean `fetch`?

        View all installed commands with `cargo --list`

Running either dx build or dx serve results in:

[WARN] You appear to be creating a Dioxus project from scratch; we will use the default config
[INFO] 🚅 Running build command...
Error: 🚫 Serving project failed: error: the wasm*-unknown-unknown targets are not supported by default, you may need to enable the "js" feature. For more information see: https://docs.rs/getrandom/#webassembly-support
   --> /home/anton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.11/src/lib.rs:290:9
    |
290 | / ...   compile_error!("the wasm*-unknown-unknown targets are not supported by \
291 | | ...                   default, you may need to enable the \"js\" feature. \
292 | | ...                   For more information see: \
293 | | ...                   https://docs.rs/getrandom/#webassembly-support");
    | |______________________________________________________________________^

Questionnaire

  • I'm interested in fixing this myself but don't know where to start

I'm beginning my rust journey, so I'm not sure of what commands are the correct ones. However, I'm familiar with good, clear, concise getting started guides. So maybe I can help

@ealmloff
Copy link
Member

Cargo watch is a different package: https://crates.io/crates/cargo-watch. Now that dx supports different platforms we should replace the watch command with dx serve --platform desktop which does the same thing without a new cli. The commands should be run in different terminals

@ealmloff ealmloff added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants