https://github.com/startdusk/image-effects
a wasm demo
https://github.com/startdusk/image-effects
Last synced: 4 months ago
JSON representation
a wasm demo
- Host: GitHub
- URL: https://github.com/startdusk/image-effects
- Owner: startdusk
- License: mit
- Created: 2021-12-07T15:14:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-07T15:25:19.000Z (over 4 years ago)
- Last Synced: 2025-10-23T23:40:30.342Z (8 months ago)
- Language: HTML
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-effects
a wasm demo
初始化
```bash
$ mkdir image-effects && cd image-effects
$ cargo init --lib
$ npm init -y
$ npm i -D webpack webpack-cli webpack-dev-server
$ npm i -D html-webpack-plugin
```
配置 ts https://www.tslang.cn/docs/handbook/react-&-webpack.html
webpack 编译 rust
wasm-pack
```bash
$ npm i -D @wasm-tool/wasm-pack-plugin
```
然后配置到 webpack.config.js
运行编译会在目录下生成 pkg 文件夹,里面放的就是 rust 被编译成 js 文件
运行
```bash
$ yarn serve
```