https://github.com/zuramai/vite-wasm-starter
Vite + Webassembly starter project
https://github.com/zuramai/vite-wasm-starter
boilerplate rust typescript wasm wasm-example
Last synced: about 1 month ago
JSON representation
Vite + Webassembly starter project
- Host: GitHub
- URL: https://github.com/zuramai/vite-wasm-starter
- Owner: zuramai
- Created: 2022-08-17T02:00:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-20T07:49:00.000Z (over 2 years ago)
- Last Synced: 2025-03-18T18:42:57.592Z (about 1 month ago)
- Topics: boilerplate, rust, typescript, wasm, wasm-example
- Language: Rust
- Homepage: https://zuramai.github.io/vite-wasm-starter
- Size: 181 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
![]()
![]()
Vite + Typescript+ Webassembly
A starter project for you to create a blazingly fast web application
## Before getting started
You need to get these prerequisites installed:
* [Rust](https://www.rust-lang.org/learn/get-started)
* [NodeJS](https://nodejs.org)
* [wasm-pack](https://github.com/rustwasm/wasm-pack)
* [rsw-rs](https://github.com/lencx/rsw-rs)## Installation
#### 1. Clone the repository
```sh
git clone https://github.com/zuramai/vite-wasm-starter
cd vite-wasm-starter
```#### 2. Install dependencies
```sh
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:
```sh
pnpm dev
```## Deploying
Run:
```sh
pnpm run build
```## Adding a crate
1. Generate rust crate
```sh
pnpm rsw new hello-world
```This will create a crate in a folder named `hello-world`
2. Edit `rsw.toml` to register the crate
```sh
[[crates]]
name = "hello-world"
```