# u-wasm

> ```ts import { createWasm,useCCall,useCWrap } from "u-wasm"; import { readFileSync } from "fs"; const buf = readFileSync("./math.wasm"); const cwrap = useCWrap(); const ccall = useCCall(); const w = await createWasm(buf); const wasm = w.use(cwrap).

Latest version **1.0.1** (published 2022-03-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install u-wasm
pnpm add u-wasm
yarn add u-wasm
bun add u-wasm
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-03-16 |
| First published | 2022-03-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 阿豪boy |
| Maintainers | ahaoboy |

## Links

- npm: https://www.npmjs.com/package/u-wasm
- npm.io page: https://npm.io/package/u-wasm

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [e-emscripten](https://npm.io/package/e-emscripten.md) ^0.1.4

## Recent versions

- 1.0.1 (latest) — 2022-03-16
- 1.0.0 — 2022-03-16

## README

```ts
import { createWasm,useCCall,useCWrap } from "u-wasm";
import { readFileSync } from "fs";
const buf = readFileSync("./math.wasm");
const cwrap = useCWrap();
const ccall = useCCall();
const w = await createWasm(buf);
const wasm = w.use(cwrap).use(ccall);
console.log(wasm.ccall("add", 1, 1));
const fib = wasm.cwrap("fib");
console.log(fib(10));
return wasm;
```

---
_Source: https://npm.io/package/u-wasm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
