mirror of
https://github.com/rzmk/czv.git
synced 2025-12-27 19:27:00 +00:00
docs: add WASM library demo using Vite & React
This commit is contained in:
parent
bc05a9f46e
commit
93bc82bd36
27 changed files with 534 additions and 111 deletions
|
|
@ -20,7 +20,7 @@ Or use `npm`, `pnpm`, or `yarn` instead of `bun`.
|
|||
The following example is written in TypeScript:
|
||||
|
||||
```ts
|
||||
import init, * as czv from "czv";
|
||||
import init, * as czv from "czv-wasm";
|
||||
// Must run `await init()` or `initSync()` first for web use
|
||||
await init();
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ cargo install wasm-pack
|
|||
### Build WASM for web
|
||||
|
||||
```bash
|
||||
wasm-pack build --release --target web --out-name czv
|
||||
wasm-pack build --release --target web
|
||||
```
|
||||
|
||||
**Note**: Currently you must modify the `pkg/package.json` by replacing the name from `czv-wasm` to `czv`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue