Yew Development Environment (Rust + Yew + Node + Rollup)
Just run the run script; it should correctly initialize the environment at the first run (both cargo and npm)
./runMake sure to customize both Cargo.toml and package.json
Moreover, if you rename the project/folder accordingly, you have to remeber to change also the filenames in main.js
In short: wherever you see "yew-devenv", yew_devenv.js or yew_devenv_bg.wasm you have to substitute with the name of your project (example if the first becomes "awesome-project", you have to substitute in main.js also awesome_project.js and awesome_project_bg.wasm respectively)
Sometimes the hot-reload server or the thttp server just stay up, while building fails, etc.
In case of "zombie" servers, try to fix it with --clean
./run --cleanThe environment is as such:
- Rust package managing through Cargo
- JavaScript package managing through NPM
- Rust-WASM binds through Wasm-Pack and web-sys
- JS packer through rollup
- dev-server though thttp
- hot-reload though cargo watch and rollup-plugin-livereload
Copyleft 2020, Davide Del Papa
This repo is under the unlicense license. Substitute the license in your own project at will.
May God bless you.