{"repo":"sn99/wasm-template-rust","free":true,"listed":false,"github":"https://github.com/sn99/wasm-template-rust","clone":"git clone https://github.com/sn99/wasm-template-rust.git","description":"A wasm 🕸 template for Rust 🦀 to publish to gh-pages without npm-deploy","language":"Rust","stars":120,"topics":["wasm","rust","template","deploy","wasm-template","github-page","gh-pages"],"license":"Apache-2.0","category":"saas-starters-boilerplates","readme_excerpt":"Wasm template for Rust hosting without npm-deploy on github pages using Travis script Featured on This Week in Rust 327 Last updated: 29th-September-2023 It automatically hosts you wasm projects on gh-pages using a travis script on the latest commit. Requirements - rust-toolchain - wasm-pack - npm Steps : For building : - Download the template as it is - Change Cargo.toml to suit yourself - Change www/package.json to suit yourself, also remember to change Into : - Run wasm-pack build inside your project dictionary - Run npm install inside www folder - Next, modify www/index.js to import your PROJECT instead of the wasm-template-rust package - Again run npm install inside www folder (just to be sure) - Finally run npm run start inside www and visit http://localhost:8080 to see the results For deployment : The template comes with a preconfigured .travis.yml but you will still need to : - Create a new branch by the name gh-pages - Github pages should be enabled by default but if not go to Settings - GitHub Pages and enable it on your gh-pages branch. You will also find the link to your to-be hosted page there - Make a personal access token (only the token no need for command line here) - Next we will need to put this token into our travis settings, go to more options - settings - Environment Variables and enter the token value (the generated token code) and name as GITHUB TOKEN , it should look like : Additional : - Update LICENSE-MIT and LICENSE-APACHE to reflect your name and ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sn99","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sn99/wasm-template-rust/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}