DioxusLabs / example-projects

Featured Dioxus projects on how to build clean user interfaces in Rust
498 stars 63 forks source link

TodoMVC: How to build and run? #15

Closed malaire closed 1 year ago

malaire commented 2 years ago

TodoMVC doesn't have any documentation of how to build and run the example.

Simple cargo run fails with following error on Debian 11:

panicked at 'cannot call wasm-bindgen imported functions on non-wasm targets', /home/malaire/.cargo/registry/src/localhost-86e39b43d7f3e3e9/js-sys-0.3.59/src/lib.rs:5365:1
AiyionPrime commented 2 years ago

I assume you followed the getting started guide for web and therefore tried to use trunk serve after setting up your toolchain? Will try this example myself in a moment.

AiyionPrime commented 2 years ago

Did work: https://dioxuslabs.com/reference/platforms/web#getting-started-web Good luck!

vi commented 1 year ago

Primary README contains this phrase:

Each project has information on how to build/deploy.

Yet I don't see such information in TodoMVC's README.

https://dioxuslabs.com/reference/platforms/web#getting-started-web

Error 404 Page not found

zjp-CN commented 1 year ago

The doc seems to be here https://dioxuslabs.com/docs/0.3/guide/en/getting_started/web.html

$ cd todomvc
$ dioxus serve
...
Dioxus @ v0.1.5 [20:19:54]

        > Local : http://localhost:8080/
        > NetWork : http://xxx:8080/

        > Profile : Debug
        > Hot Reload : Normal
        > Index Template : Custom [index.html]
        > URL Rewrite [index_on_404] : True

        > Build Time Use : 3937 millis

[INFO] A perfect compilation!

It compiles, but the page is blank.

hpfmn commented 1 year ago

I had the same issue removing the index.html helped

magick93 commented 10 months ago

https://dioxuslabs.com/reference/platforms/web#getting-started-web is 404.

image

The TodoMVC docs folder doesnt display in the browser.

image

Just a simple markdown based instructions would be much easier.

ealmloff commented 10 months ago

https://dioxuslabs.com/reference/platforms/web#getting-started-web is 404.

image

The TodoMVC docs folder doesnt display in the browser.

image

Just a simple markdown based instructions would be much easier.

Where did you find that link? It should now be https://dioxuslabs.com/learn/0.4/getting_started/wasm

ealmloff commented 10 months ago

The docs are all markdown that lives here: https://github.com/DioxusLabs/docsite/tree/master/docs-src/0.4. If you prefer raw markdown, you can use that folder directly

magick93 commented 10 months ago

Thanks @ealmloff

I've read the getting started guides on https://dioxuslabs.com/learn/0.4/getting_started/, now I want to review some examples.

Maybe adding the following to the TodoMVC readme could help:

cargo install dioxus-cli
dx serve
ealmloff commented 10 months ago

Thanks @ealmloff

I've read the getting started guides on https://dioxuslabs.com/learn/0.4/getting_started/, now I want to review some examples.

Maybe adding the following to the TodoMVC readme could help:

cargo install dioxus-cli
dx serve

Adding something to any/all of the examples about how to run them would be great!