Replies: 1 comment
|
The first two commands are actually succeeding. The log shows the bundle finishing, and the generated server starts and registers your route. The important part is that a Dioxus fullstack deployment is a directory, not a standalone server binary. For a production build, use: Then deploy the whole target/dx/server/release/web directory. It should contain both items next to each other: Dioxus 0.7.10 looks for static files at public beside the running executable. That explains the cargo build result: Cargo produced target/release/server, but it did not create the companion public directory, so the binary panics on startup. DIOXUS_PUBLIC_PATH can override that location, but copying the complete bundle is simpler. The remaining Raspberry Pi detail is the CPU target. Build on the Pi itself, or cross-compile the server for the Pi architecture, usually aarch64-unknown-linux-gnu on a 64-bit OS. Copying an x86_64 server binary will not work even if the public directory is present. For a systemd service, also set IP=0.0.0.0 and the desired PORT if the server must be reachable from another machine. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, i want to build a dioxus server executable that should run as a service on my rpi.
I have a problem with building the executable. doesent matter wich build command i use, non of them works.
i cannot tell if this is a me problem or a dioxus problem.
i also cannot tell what command is technicly the correct one but i guess its
dx build --platform serverwhen i do
dx build --platform serveri get:when i do
dx build --platform webi get:when i do
cargo build --release --features serveri get:All reactions