emscripten-core / emscripten-core/emscripten

Use RAWNODEFS with MEMFS on the same module

Open
#23,566 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

I have a library that uses emscripten, and I would like to add an option for the consumer to use MEMFS or RAWNODEFS.
I tried adding to the compilation `-lnoderawfs.js -lnodefs.js`, but the RAWNODEFS replaces the MEMFS automatically, on the following lines:

```js
// Wrap the whole in-memory filesystem API with
// our Node.js based functions
for (var _key in NODERAWFS) {
FS[_key] = _wrapNodeError(NODERAWFS[_key]);
}
```

Is it possible to import the MEMFS and NODERAWFS, but choose at runtime which one to use?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.