The following github project might be helpful for you. It builds a rust tokio/axum web-service binary, integrating a webui frontend based on Vue framework (npm based): https://github.com/frehberg/rust-vue-demo
The web-service backend is based on Rust Tokio-Axum framework.
The web-service will read read/return the embedded files on request.
This compact Vue app realizes a dynamic web frontend, displaying the data it receives via websocket from web-service.
Step by step
After download, at first the npm project must be initialized, downloading the node.js dependencies.
> cd webui; npm install
Vue code and Rust code will be built together and executed using a single command, combining the cargo and npm build process
> cargo run
The Vue application (web frontend) is defined by template file webui/src/App.vue, and the result of the npm-build-process will be placed in folder webui/dist/. The Rust backend binary is defined by src/main.rs. The following image shows the complete source tree.
First, the build process will compile the Vue application (see build.rs), producing the files in folder webui/dist. Then the rust_embed macros in src/main.rs will embed the generated files of webui/dist/ and the rust compiler will generate the executable.
When connecting with web-browser to host at port 3000, eg http://127.0.0.1:3000, the webui will be loaded and it will open a websocket, receiving data from web-service once per second, suitable for process monitoring.