1.0.0 • Published 7 months ago

@zenfs/emscripten v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

ZenFS Emscripten Backend

!WARNING This package has not been extensively tested and may not be stable.

If you find a bug, please report it. Thanks!

ZenFS backend for usage with Emscripten.

For more information, see the docs.

!IMPORTANT Please read the ZenFS core documentation!

Installing

npm install @zenfs/emscripten

Usage

!NOTE The examples are written in ESM.
For CJS, you can require the package.
If using a browser environment, you can use a <script> with type=module (you may need to use import maps)

import { configure, fs } from '@zenfs/core';
import { Emscripten } from '@zenfs/emscripten';

// Note: this assumes you have included Emscripten correctly and have the global `FS` variable available.
await configureSingle({ backend: Emscripten, FS: FS });

if (!fs.existsSync('/test.txt')) {
	fs.writeFileSync('/test.txt', 'This is in the Emscripten file system!');
}

const contents = fs.readFileSync('/test.txt', 'utf-8');
console.log(contents);
1.0.0

7 months ago

0.1.2

8 months ago

0.1.1

9 months ago

0.1.0

9 months ago

0.0.2

10 months ago

0.0.1

10 months ago