New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@wasmer/wasmfs

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wasmer/wasmfs

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

latest
Source
npmnpm
Version
0.12.0
Version published
Maintainers
1
Created
Source

@wasmer/wasmfs

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

Documentation for Wasmer-JS Stack can be found on the Wasmer Docs.

Table of Contents

Features

This project heavily depends on memfs to provide the sandboxed fs implementation. 🙏😄

This package provides the following features:

  • In-memory file-system with Node's fs API using memfs. 🗄️
  • Scaffolds common files used by the Wasmer Runtime (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:

npm install --save @wasmer/wasmfs

Quick Start

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.

Contributing

This project follows the all-contributors specification.

Contributions of any kind are welcome! 👍

Keywords

wasm

FAQs

Package last updated on 16 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts