The JS file that the file packager creates depends on the emscripten
runtime code, so you do need to compile a program to use it. But perhaps
you can compile a small one. Then you just combine the JS from that with
the JS from the file packager and it should work. There are examples of
this in the test suite I believe (search for FILE_PACKAGER in tests/*).


On Wed, Jul 19, 2023 at 3:39 AM Ronny Nissengold <ronny....@gmail.com>
wrote:

> Thanks!
> But I am not trying to compile into a project a filesystem. I already did
> that successfully using the embind flags.
> I am trying to work with a filesystem for a project separately from its
> compilation.
> Is that at all possible?
> I tried using the file_packager.py to no avail.
> It generates a .data file with the FS and the .js file I don't know what
> to do with.
>
> ב-יום שלישי, 18 ביולי 2023 בשעה 18:53:36 UTC+3, alon...@gmail.com כתב/ה:
>
>> That error might be because we do not export all functions by default.
>> Try with
>>
>> emcc -sEXPORTED_RUNTIME_METHODS=addRunDependency
>>
>> On Sun, Jul 16, 2023 at 7:22 AM Ronny Nissengold <ronn...@gmail.com>
>> wrote:
>>
>>> Hi all,
>>> By giving the linker the --preload-file flag with the appropriate folder
>>> I was able to successfully create and access the emscripten FS from cpp as
>>> I usually would.
>>> However I would like to be able to create a FS separately from the
>>> compilation process. It just feels wrong.
>>> I was able to use the file_packager.py to create a .data and .js file.
>>> I tried running the filesystem.js before my main .js file in my custom
>>> index.html, and got an error:
>>> Module.addRunDependency is not a function
>>> Any idea what am I doing wrong? What is the best way to create and
>>> access FS in emscripten? Should I just preload in the linker?
>>> Thanks!
>>> Ronny
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to emscripten-disc...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/31e7e544-610b-48c4-993a-b8272037c6e1n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/31e7e544-610b-48c4-993a-b8272037c6e1n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/aea0f159-cc08-4216-b7cc-0d78f5f0a37en%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/aea0f159-cc08-4216-b7cc-0d78f5f0a37en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRk6fXtFtySjeuJVQ8v3P3at517aLZiwC19sm818ghvYg%40mail.gmail.com.

Reply via email to