Add a Best Practices section to the website. NFC - #27334
Conversation
7d2220d to
7052085
Compare
f9da982 to
407b7ab
Compare
dschuff
left a comment
There was a problem hiding this comment.
oops, I forgot to hit send yesterday.
sbc100
left a comment
There was a problem hiding this comment.
Feedback addressed
a282780 to
b759f99
Compare
| - **Don't include the "=1" suffix for boolean flags.** For example, write | ||
| ``-sSTRICT`` and ``-sALLOW_MEMORY_GROWTH`` rather than ``-sSTRICT=1`` or | ||
| ``-sALLOW_MEMORY_GROWTH=1``. | ||
| - **Use separate compilation** by compiling ``.cpp`` sources to ``.o`` object |
There was a problem hiding this comment.
I would put all the things before this in a "lint" section. Separate compilation and C++/JS interop feel like substantially different things, choices about the build system and design.
There was a problem hiding this comment.
I've called this section "Command-Line Style" .. I also considered "Command line hygene"
| - For small temporary files, ``MEMFS`` is sufficient. | ||
| - For persistent client-side data storage across browser sessions, use | ||
| asynchronous storage backends such as :ref:`filesystem-api-idbfs` or the | ||
| :ref:`Filesystem-API`. |
There was a problem hiding this comment.
Perhaps just link to the main filesystem page for filesystem recommendations? This could also summarize that page, if we want that (if so, perhaps mention WasmFS).
There was a problem hiding this comment.
Yes, that makes sense. Linked to wider docs on FS
There was a problem hiding this comment.
I removed this section for now
I've been working on this as part of the https://developer.chrome.com/docs/modern-web-guidance project and it seems like whatever we do there it makes sense to maintain best practices guide directly in emscripten.