DioxusLabs / DioxusLabs/dioxus
[web] Support single-binary distribution of the server by embedding the assets into the binary
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
Support single-binary distribution of the server by embedding the assets into the binary on the web target in full-stack mode.
This allows simple distribution of the server as a single binary, instead of having multiple files in an archive. This for example allows easy self-updating, as only the binary needs to be replaced.
## Implement Suggestion
For example rust-embed could be used for embedding the assets.
There could be a flag `--embed` used during build, which would embed the assets and read from the embedded rust-embed struct, instead of checking DIOXUS_PUBLIC_DIR
It's currently possible to achive this with a [build.rs](https://git.plan.ai/plan-ai/mac-mgmt/-/blob/trunk/daemon/build.rs?ref_type=heads#L58-118) and some tweaking to how dioxus server is launched but this is cumbersome and a native feature would be better
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.