DioxusLabs/example-projects

TodoMVC: How to build and run?

malaire opened this issue ยท 10 comments

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

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.

vi commented

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

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

I had the same issue removing the index.html helped

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.

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

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

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

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!