Wasm Template Rust Save Abandoned

A wasm 🕸 template for Rust 🦀 to publish to gh-pages without npm-deploy

Project README

Wasm template for Rust hosting without npm-deploy on github pages using Travis script

Build Status

It automatically hosts you wasm projects on gh-pages using a travis script on the latest commit.

Requirements

Steps :

For building :

  "dependencies": {
    "wasm-template-rust": "file:../pkg"
  },

Into :

  "dependencies": {
    "YOUR-PROJECT-NAME-SAME-AS-IN-CARGO.toml": "file:../pkg"
  },
  • 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 : token

Additional :

License

Licensed under either of these:

Open Source Agenda is not affiliated with "Wasm Template Rust" Project. README Source: sn99/wasm-template-rust
Stars
100
Open Issues
1
Last Commit
3 years ago
License

Open Source Agenda Badge

Open Source Agenda Rating