Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-wasm-pack

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-wasm-pack - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

package.json
{
"name": "vite-plugin-wasm-pack",
"version": "0.1.1",
"version": "0.1.2",
"description": "wasm-pack for Vite",

@@ -19,3 +19,4 @@ "main": "dist/index.js",

"rust",
"webassembly"
"webassembly",
"cargo"
],

@@ -22,0 +23,0 @@ "author": "nshen <nshen121@gmail.com>",

55

README.md

@@ -5,7 +5,58 @@ # 🚚 vite-plugin-wasm-pack

Vite plugin for [wasm-pack](https://github.com/rustwasm/wasm-pack) rust
🚚 Vite plugin for rust [wasm-pack](https://github.com/rustwasm/wasm-pack), it's simple.
## Install
## Quick start
Make sure [wasm-pack](https://github.com/rustwasm/wasm-pack) installed correctly.
Clone this repo or download the [zip file](https://github.com/nshen/vite-plugin-wasm-pack/archive/refs/heads/main.zip), extract the example folder.
```
example
|
|-- my-crate # rust project folder, there is a Cargo.toml in it
|-- src # front end source code
| |-- index.ts # entry point
|-- index.html # html entry
|-- vite.config.ts # vite config file
|__ package.json # npm config file
```
Install npm develop dependencies, **in example folder** run:
```bash
yarn install
# or
# npm install
```
After that you can build `rust project` to `WebAassembly` by using `wasm-pack`.
```bash
wasm-pack build ./my-crate --target web
```
Now the `my-crate` module is ready, start vite dev server.
```bash
yarn dev
or
#npm run dev
```
Done, if below is showing.
```bash
vite v2.3.8 dev server running at:
> Local: http://localhost:3000/
ready in 169ms.
```
---
## Install manually
```bash
yarn add vite vite-plugin-wasm-pack -D

@@ -12,0 +63,0 @@ # or

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc