vite-wasm-starter

Vite + Webassembly starter project

Stars
13

Before getting started

You need to get these prerequisites installed:

Installation

1. Clone the repository

git clone https://github.com/zuramai/vite-wasm-starter
cd vite-wasm-starter

2. Install dependencies

pnpm install # OR npm install

3. Run the application

You should open two tabs of terminal. **The order of execution is important and do not close the first window **.

In the first tab, run:

pnpm rsw watch

In the second tab, run:

pnpm dev

Deploying

Run:

pnpm run build

Adding a crate

  1. Generate rust crate
pnpm rsw new hello-world

This will create a crate in a folder named hello-world

  1. Edit rsw.toml to register the crate
[[crates]]
name = "hello-world"