# @wasmer/wasmfs

> Isomorphic library to provide a sandboxed node fs implementation for Node and Browsers. 📂

Latest version **0.12.0** (published 2020-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wasmer/wasmfs
pnpm add @wasmer/wasmfs
yarn add @wasmer/wasmfs
bun add @wasmer/wasmfs
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.12.0 |
| Published | 2020-09-16 |
| First published | 2019-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 428.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1268 |
| Author | Wasmer Engineering Team |
| Maintainers | syrusakbary |
| Keywords | wasm, wasi, fs, file, system, wapm, wasmer |

## Links

- npm: https://www.npmjs.com/package/@wasmer/wasmfs
- Repository: https://github.com/wasmerio/wasmer-js
- Homepage: https://github.com/wasmerio/wasmer-js/tree/master/packages/wasmfs
- Issues: https://github.com/wasmerio/wasmer-js/issues
- npm.io page: https://npm.io/package/@wasmer/wasmfs

## Dependencies (3)

- [pako](https://npm.io/package/pako.md) ^1.0.11
- [memfs](https://npm.io/package/memfs.md) 3.0.4
- [tar-stream](https://npm.io/package/tar-stream.md) ^2.1.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.12.0 (latest) — 2020-09-16
- 0.11.2 — 2020-05-14
- 0.11.1 — 2020-05-14
- 0.11.0 — 2020-05-13
- 0.10.2 — 2020-03-18
- 0.10.1 — 2020-03-10
- 0.10.0 — 2020-03-05
- 0.9.1 — 2020-03-02
- 0.9.0 — 2020-02-29
- 0.8.5 — 2020-02-24
- 0.8.4 — 2020-02-22
- 0.8.3 — 2020-02-21
- 0.8.2 — 2020-02-21
- 0.8.1 — 2020-02-21
- 0.8.0 — 2020-02-21
- … 21 more at https://npm.io/package/@wasmer/wasmfs/versions

## README

# `@wasmer/wasmfs`

Isomorphic library to provide a sandboxed [node `fs`](https://nodejs.org/api/fs.html) implementation for Node and Browsers. 📂

Documentation for Wasmer-JS Stack can be found on the [Wasmer Docs](https://docs.wasmer.io/wasmer-js/wasmer-js).

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Reference API](#reference-api)
- [Contributing](#contributing)

## Features

This project heavily depends on [memfs](https://github.com/streamich/memfs) to provide the sandboxed `fs` implementation. 🙏😄

This package provides the following features:

- In-memory file-system with Node's fs API using [memfs](https://github.com/streamich/memfs). 🗄️
- Scaffolds common files used by the [Wasmer Runtime](https://github.com/wasmerio/wasmer) (e.g I/O Device files like `/dev/stdout`), to provide a similar experience to the Wasmer Runtime. 🔌
- Provides convienence functions for grabbing Input / Output. ↔️
- Allows overriding read/write of individual files to allow for custom implementations. 🛠️

## Installation

For installing `@wasmer/wasmfs`, just run this command in your shell:

```bash
npm install --save @wasmer/wasmfs
```

## Quick Start

```js
import { WasmFs } from "@wasmer/wasmfs";

const wasmFs = new WasmFs();

wasmFs.fs.writeFileSync("/dev/stdout", "Quick Start!");

wasmFs.getStdOut().then(response => {
  console.log(response); // Would log: 'Quick Start!'
});
```

## Reference API

The Reference API Documentation can be found on the [`@wasmer/wasmfs` Reference API Wasmer Docs](https://docs.wasmer.io/integrations/js/reference-api/wasmer-wasmfs).

## Contributing

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.

Contributions of any kind are welcome! 👍

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