Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/edamame-x/wasmex

Run wasm in multiple environments with the same code (Browser, Node.js, Deno, Bun, etc.)
https://github.com/edamame-x/wasmex

bun deno go javascript jsr nodejs rust typescript wasm zig

Last synced: 12 days ago
JSON representation

Run wasm in multiple environments with the same code (Browser, Node.js, Deno, Bun, etc.)

Awesome Lists containing this project

README

        

# wasmex

Run wasm in multiple environments with the same code (Browser, Node.js, Deno,
Bun, etc.)

```bash
npx jsr add jsr:@evex/wasmex
bunx --bun jsr add jsr:@evex/wasmex
deno add jsr:@evex/wasmex
```

```ts
import { Wasmex } from "@evex/wasmex";

// base64 or unit8array
const wasmSource = ...;

const wasm = await Wasmex(wasmSource); // or await Wasmex(wasmSource, importObject)

// 3
console.log(
wasm.instance.exports.addOne(2),
);
```

by [@EdamAme-x](https://x.com/amex2189) & [@evex-dev](https://evex.land)