Skip to content

Web app written in Rust and WebAssembly which shows how these two can be powerful in an enterprise environment

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

nemwiz/wasm-example

Repository files navigation

wasm-pack-template

Built with 🦀🕸 by The Rust and WebAssembly Working Group

Web assembly for enterprise developers

This is an example repo that I used on my talk for a local meetup in Singapore. You can watch the full talk on YouTube

Before you start

  1. Install Rust
  2. Install wasm-pack
  3. Install Node

Run npm install to pull in the dependencies.

Compiling and running the project

  1. Run wasm-pack build (this needs to be done every time after change in Rust code)
  2. Run npm start
  3. Go to http://localhost:8080

Running a local Python server

  1. Run cd server && python3 server.py

Downloading large files via LFS

This repo contains one big csv file with over 1 million record.

To store large files in a repository, we use Git LFS.

Steps to install:

  • Install Git LFS
  • Run sudo apt-get install git-lfs
  • Run git lfs pull in this repository
  • The file will be downloaded in the data folder

About

A template for kick starting a Rust and WebAssembly project using wasm-pack.

Build Status

📚 Read this template tutorial! 📚

This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.

Be sure to check out other wasm-pack tutorials online for other templates and usages of wasm-pack.

🚴 Usage

🐑 Use cargo generate to Clone this Template

Learn more about cargo generate here.

cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
cd my-project

🛠️ Build with wasm-pack build

wasm-pack build

🔬 Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

🎁 Publish to NPM with wasm-pack publish

wasm-pack publish

🔋 Batteries Included

About

Web app written in Rust and WebAssembly which shows how these two can be powerful in an enterprise environment

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published