Open JanPokorny opened 3 months ago
Emscripten does not have any official support for Deno, and we don't currently do any testing under Deno.
Does deno claim to be API compatible with node for things like the fs
module? If so I don't see why it wouldn't work there. All we do in emscripten is use the normal node fs
API as far as I know.
If you (or anyone else) would like to contribute some level support and testing with deno that would be most welcome.
@sbc100 Deno claims fs
compatibility with the following caveats (https://docs.deno.com/runtime/manual/node/compatibility):
Does this look like anything that would affect NODEFS?
In any case I have raised this with Deno as well: https://github.com/denoland/deno/issues/23181
I don't think our NODEFS code depends on any of those things... but I could be wrong.
It might be good to create a simple/small example of a C program that reproduces this issue.. then perhaps do some tracing debugging to see which NODEFS/fs calls are used.
This is an issue I have originally rised with Pyodide here: https://github.com/pyodide/pyodide/issues/4647
As Pyodide utilizes NODEFS directly from Emscripten, the maintainers suggested I raise this bug here.
This is an example Node.js program that uses Pyodide to write a file in a NODEFS-mounted folder:
This works as expected, the file
out.txt
with contentsHello, World!
is written to current folder.The same code, adjusted to run with Deno:
This, however, crashes with the following output:
Not sure if NODEFS aims to officially support Deno, or if this is even fixable on Emscripten side (maybe it's purely a Deno bug) -- but raising it anyway for awareness.