# @hazae41/memory.wasm

> Zero-copy memory for WebAssembly

Latest version **1.0.37** (published 2025-09-25) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @hazae41/memory.wasm
pnpm add @hazae41/memory.wasm
yarn add @hazae41/memory.wasm
bun add @hazae41/memory.wasm
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.37 |
| Published | 2025-09-25 |
| First published | 2024-08-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 51.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | hazae41 |
| Maintainers | hazae41 |
| Keywords | reproducible, webassembly, memory, bytes, reference, box, browser, typescript, rust, unit-tested, deno |

## Links

- npm: https://www.npmjs.com/package/@hazae41/memory.wasm
- Repository: https://github.com/hazae41/memory.wasm
- Homepage: https://github.com/hazae41/memory.wasm#readme
- Issues: https://github.com/hazae41/memory.wasm/issues
- npm.io page: https://npm.io/package/@hazae41/memory.wasm

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.37 (latest) — 2025-09-25
- 1.0.36 — 2025-09-25
- 1.0.35 — 2025-09-25
- 1.0.34 — 2025-09-23
- 1.0.33 — 2025-09-23
- 1.0.32 — 2025-09-23
- 1.0.31 — 2025-09-23
- 1.0.28 — 2025-09-23
- 1.0.27 — 2025-06-24
- 1.0.26 — 2025-06-24
- 1.0.25 — 2025-06-24
- 1.0.24 — 2025-06-24
- 1.0.23 — 2025-06-24
- 1.0.22 — 2025-06-24
- 1.0.21 — 2025-06-24
- … 19 more at https://npm.io/package/@hazae41/memory.wasm/versions

## README

# memory.wasm

Zero-copy memory for WebAssembly

```bash
npm install @hazae41/memory.wasm
```

```bash
deno install jsr:@hazae41/memory-wasm
```

[**📦 NPM**](https://www.npmjs.com/package/@hazae41/memory.wasm) • [**📦 JSR**](https://jsr.io/@hazae41/memory-wasm)

## Features
- Reproducible building
- Pre-bundled and streamed
- Zero-copy memory slices

## Usage

```typescript
import { ExampleWasm, Memory, example_method } from "@hazae41/example.wasm";

// Wait for initialization
await ExampleWasm.initBundled();

// Pass bytes to memory
using memory = new Memory();

// View bytes from memory
console.log(memory.bytes)

// Call method with 0-copy
example_method(memory)
```

## Building

### Reproducible building

You can build the exact same bytecode using Docker

```bash
npm run compile
```

Then check that all the files are the same using `npm diff`

```bash
npm diff
```

If the output is empty then the bytecode is the same as the one I published on NPM.

### Automated checks

Each time I release a new version on GitHub, the GitHub's CI clones the GitHub repository, reproduces the build, and throws an error if the NPM release is different. If a version is present on NPM but not on GitHub, do not use it!

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