Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rust-plugins/wasm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @farmfe/plugin-wasm

A farm plugin for importing Wasm modules.
A Farm plugin for seamless WebAssembly integration and support `wasm-pack` generated modules.

## Installation

Expand Down Expand Up @@ -48,4 +48,9 @@ init({
});
```

In production builds, `.wasm` files smaller than the `assetInlineLimit` will be inlined as base64 strings. Otherwise, they will be treated as static assets and fetched on demand.
You can also directly import WASM packages like ESM modules without using the `?init` query:

```ts
import { someFunc } from 'wasm-project';
someFunc(); // Run this wasm function
```