You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/source/docs/api_reference/Filesystem-API.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,9 +38,9 @@ Including File System Support
38
38
39
39
Emscripten decides whether to include file system support automatically. Many programs don't need files, and file system support is not negligible in size, so Emscripten avoids including it when it doesn't see a reason to. That means that if your C/C++ code does not access files, then the ``FS`` object and other file system APIs will not be included in the output. And, on the other hand, if your C/C++ code does use files, then file system support will be automatically included. So normally things will "just work" and you don't need to think about this at all.
40
40
41
-
However, if your C/C++ code doesn't use files, but you want to use them from JavaScript, then you can build with ``-s FORCE_FILESYSTEM=1``, which will make the compiler include file system support even though it doesn't see it being used.
41
+
However, if your C/C++ code doesn't use files, but you want to use them from JavaScript, then you can build with ``-sFORCE_FILESYSTEM``, which will make the compiler include file system support even though it doesn't see it being used.
42
42
43
-
On the other hand, if you want to **not** include any filesystem support code (which may be included even due to printf or iostreams, due to how musl and libc++ are structured), you can build with ``-s FILESYSTEM=0``. Very simple stdout support will be included if necessary in such a case, enough for printf and such to work, but no filesystem code will be added, which can save a significant amount of code size.
43
+
On the other hand, if you want to **not** include any filesystem support code (which may be included even due to printf or iostreams, due to how musl and libc++ are structured), you can build with ``-sFILESYSTEM=0``. Very simple stdout support will be included if necessary in such a case, enough for printf and such to work, but no filesystem code will be added, which can save a significant amount of code size.
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note: If ``-s DYNAMIC_EXECUTION=0`` is set, this function will not be available.
273
+
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note: If ``-sDYNAMIC_EXECUTION=0`` is set, this function will not be available.
274
274
275
275
This function can be called from a pthread, and it is executed in the scope of the Web Worker that is hosting the pthread. To evaluate a function in the scope of the main runtime thread, see the function emscripten_sync_run_in_main_runtime_thread().
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note: If ``-s DYNAMIC_EXECUTION=0`` is set, this function will not be available.
284
+
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note: If ``-sDYNAMIC_EXECUTION=0`` is set, this function will not be available.
285
285
286
286
This function can be called from a pthread, and it is executed in the scope of the Web Worker that is hosting the pthread. To evaluate a function in the scope of the main runtime thread, see the function emscripten_sync_run_in_main_runtime_thread().
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note that this overload uses a single buffer shared between calls. Note: If ``-s DYNAMIC_EXECUTION=0`` is set, this function will not be available.
296
+
Interface to the underlying JavaScript engine. This function will ``eval()`` the given script. Note that this overload uses a single buffer shared between calls. Note: If ``-sDYNAMIC_EXECUTION=0`` is set, this function will not be available.
297
297
298
298
This function can be called from a pthread, and it is executed in the scope of the Web Worker that is hosting the pthread. To evaluate a function in the scope of the main runtime thread, see the function emscripten_sync_run_in_main_runtime_thread().
299
299
@@ -481,7 +481,7 @@ Functions
481
481
482
482
The difference is that ``emscripten_force_exit`` will shut down the runtime even if you previously called :c:func:`emscripten_exit_with_live_runtime` or otherwise kept the runtime alive. In other words, this method gives you the option to completely shut down the runtime after it was kept alive beyond the completion of ``main()``.
483
483
484
-
Note that if ``EXIT_RUNTIME`` is not set (which is the case by default) then the runtime cannot be shut down, as we do not include the code to do so. Build with ``-s EXIT_RUNTIME=1`` if you want to be able to exit the runtime.
484
+
Note that if ``EXIT_RUNTIME`` is not set (which is the case by default) then the runtime cannot be shut down, as we do not include the code to do so. Build with ``-sEXIT_RUNTIME`` if you want to be able to exit the runtime.
485
485
486
486
:param int status: The same as for the *libc* function `exit() <http://linux.die.net/man/3/exit>`_.
487
487
@@ -1054,7 +1054,7 @@ Functions
1054
1054
1055
1055
For this command to work, you must build with the following compiler option (as we do not want to increase the build size with this metadata): ::
1056
1056
1057
-
-s RETAIN_COMPILER_SETTINGS=1
1057
+
-sRETAIN_COMPILER_SETTINGS
1058
1058
1059
1059
:param name: The compiler setting to return.
1060
1060
:type name: const char*
@@ -1066,7 +1066,7 @@ Functions
1066
1066
Returns whether pseudo-synchronous functions can be used.
1067
1067
1068
1068
:rtype: int
1069
-
:returns: 1 if program was compiled with ASYNCIFY=1, 0 otherwise.
1069
+
:returns: 1 if program was compiled with -sASYNCIFY, 0 otherwise.
1070
1070
1071
1071
1072
1072
.. c:function:: void emscripten_debugger()
@@ -1279,7 +1279,7 @@ Typedefs
1279
1279
Pseudo-synchronous functions
1280
1280
============================
1281
1281
1282
-
These functions require Asyncify (``-s ASYNCIFY=1``). These functions are asynchronous but appear synchronous in C. See `Asyncify <https://emscripten.org/docs/porting/asyncify.html>`_ for more details.
1282
+
These functions require Asyncify (``-sASYNCIFY``). These functions are asynchronous but appear synchronous in C. See `Asyncify <https://emscripten.org/docs/porting/asyncify.html>`_ for more details.
1283
1283
1284
1284
Sleeping
1285
1285
--------
@@ -1412,7 +1412,7 @@ Functions
1412
1412
including rarely-used functions, in which case the lazy-loading may
1413
1413
not happen at all.
1414
1414
1415
-
.. note:: This requires building with ``-s ASYNCIFY_LAZY_LOAD_CODE``.
1415
+
.. note:: This requires building with ``-sASYNCIFY_LAZY_LOAD_CODE``.
0 commit comments