Skip to content

Commit e99f39c

Browse files
authored
[docs] Consistently capitalize Wasm when referring to it in the docs. NFC (#20266)
1 parent 390011c commit e99f39c

File tree

20 files changed

+91
-92
lines changed

20 files changed

+91
-92
lines changed

docs/emcc.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ Options that are modified or new in *emcc* are listed below:
8080

8181
"-Os"
8282
[compile+link] Like "-O3", but focuses more on code size (and may
83-
make tradeoffs with speed). This can affect both wasm and
83+
make tradeoffs with speed). This can affect both Wasm and
8484
JavaScript.
8585

8686
"-Oz"
8787
[compile+link] Like "-Os", but reduces code size even further, and
88-
may take longer to run. This can affect both wasm and JavaScript.
88+
may take longer to run. This can affect both Wasm and JavaScript.
8989

9090
Note:
9191

@@ -166,7 +166,7 @@ Options that are modified or new in *emcc* are listed below:
166166
Preserve debug information, but in a separate file on the side.
167167
This is the same as "-g", but the main file will contain no debug
168168
info. Instead, debug info will be present in a file on the side, in
169-
"FILENAME" if provided, otherwise the same as the wasm file but
169+
"FILENAME" if provided, otherwise the same as the Wasm file but
170170
with suffix ".debug.wasm". While the main file contains no debug
171171
info, it does contain a URL to where the debug file is, so that
172172
devtools can find it. You can use "-sSEPARATE_DWARF_URL=URL" to
@@ -180,7 +180,7 @@ Options that are modified or new in *emcc* are listed below:
180180
file is updated to have a "sourceMappingURL" section. The resulting
181181
URL will have format: "<base-url>" + "<wasm-file-name>" + ".map".
182182
"<base-url>" defaults to being empty (which means the source map is
183-
served from the same directory as the wasm file). It can be changed
183+
served from the same directory as the Wasm file). It can be changed
184184
using --source-map-base.
185185

186186
"-g<level>"
@@ -221,7 +221,7 @@ Options that are modified or new in *emcc* are listed below:
221221
to the compiler.
222222

223223
"--emit-symbol-map"
224-
[link] Save a map file between function indexes in the wasm and
224+
[link] Save a map file between function indexes in the Wasm and
225225
function names. By storing the names on a file on the side, you can
226226
avoid shipping the names, and can still reconstruct meaningful
227227
stack traces by translating the indexes back to the names.
@@ -487,8 +487,8 @@ Options that are modified or new in *emcc* are listed below:
487487

488488
Note:
489489

490-
Note that this is only relevant when *not* emitting wasm, as
491-
wasm embeds the memory init data in the wasm binary.
490+
Note that this is only relevant when *not* emitting Wasm, as
491+
Wasm embeds the memory init data in the Wasm binary.
492492

493493
Possible values are:
494494

@@ -594,7 +594,7 @@ Options that are modified or new in *emcc* are listed below:
594594
WebAssembly).
595595

596596
* <name> **.wasm** : WebAssembly without JavaScript support code
597-
("standalone wasm"; this enables "STANDALONE_WASM").
597+
("standalone Wasm"; this enables "STANDALONE_WASM").
598598

599599
These rules only apply when linking. When compiling to object code
600600
(See *-c* below) the name of the output file is irrelevant.

docs/packaging.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ To see how our CI builds things, the relevant script is
5555
In general, the repos you need to build are LLVM and Binaryen (as emscripten
5656
itself doesn't have any binaries to build).
5757

58-
When packaging build results, you need the following executables (when using
59-
the wasm backend):
58+
When packaging build results, you need the following executables:
6059

6160
* From LLVM:
6261
* clang

site/source/docs/api_reference/emscripten.h.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,10 +1385,10 @@ IndexedDB
13851385
:param perror: An out parameter that will be filled with a non-zero value if an error occurred.
13861386
13871387
1388-
Upstream Asyncify functions
1389-
===========================
1388+
Asyncify functions
1389+
==================
13901390
1391-
These functions only work with the upstream wasm backend when using Asyncify.
1391+
These functions only work when using Asyncify.
13921392
13931393
Typedefs
13941394
--------
@@ -1408,18 +1408,18 @@ Functions
14081408
.. c:function:: void emscripten_scan_stack(em_scan_func func)
14091409
14101410
Scan the C userspace stack, which means the stack managed by the compiled
1411-
code (as opposed to the wasm VM's internal stack, which is not directly
1411+
code (as opposed to the Wasm VM's internal stack, which is not directly
14121412
observable). This data is already in linear memory; this function just
14131413
gives you a simple way to know where it is.
14141414
14151415
.. c:function:: void emscripten_scan_registers(em_scan_func func)
14161416
1417-
Scan "registers", by which we mean data that is not in memory. In wasm,
1417+
Scan "registers", by which we mean data that is not in memory. In Wasm,
14181418
that means data stored in locals, including locals in functions higher up
1419-
the stack - the wasm VM has spilled them, but none of that is observable to
1419+
the stack - the Wasm VM has spilled them, but none of that is observable to
14201420
user code).
14211421
1422-
Note that this function scans wasm locals. Depending on the LLVM
1422+
Note that this function scans Wasm locals. Depending on the LLVM
14231423
optimization level, this may not scan the original locals in your source
14241424
code. For example in ``-O0`` locals may be stored on the stack. To make
14251425
sure you scan everything necessary, you can also do
@@ -1431,15 +1431,15 @@ Functions
14311431
14321432
.. c:function:: void emscripten_lazy_load_code()
14331433
1434-
This creates two wasm files at compile time: the first wasm which is
1434+
This creates two Wasm files at compile time: the first Wasm which is
14351435
downloaded and run normally, and a second that is lazy-loaded. When an
1436-
``emscripten_lazy_load_code()`` call is reached, we load the second wasm
1436+
``emscripten_lazy_load_code()`` call is reached, we load the second Wasm
14371437
and resume execution using it.
14381438
14391439
The idea here is that the initial download can be quite small, if you
14401440
place enough ``emscripten_lazy_load_code()`` calls in your codebase, as
1441-
the optimizer can remove code from the first wasm if it sees it can't
1442-
be reached. The second downloaded wasm can contain your full codebase,
1441+
the optimizer can remove code from the first Wasm if it sees it can't
1442+
be reached. The second downloaded Wasm can contain your full codebase,
14431443
including rarely-used functions, in which case the lazy-loading may
14441444
not happen at all.
14451445
@@ -1456,8 +1456,8 @@ Emscripten runtime JS code, or run Emscripten binaries in your own runtime.
14561456
.. c:function:: void emscripten_notify_memory_growth(i32 index)
14571457
14581458
Called when memory has grown. In a JS runtime, this is used to know when
1459-
to update the JS views on the wasm memory, which otherwise we would need
1460-
to constantly check for after any wasm code runs. See
1459+
to update the JS views on the Wasm memory, which otherwise we would need
1460+
to constantly check for after any Wasm code runs. See
14611461
`this wasi discussion <https://github.com/WebAssembly/WASI/issues/82>`_.
14621462
14631463
:param i32 index: Which memory has grown.

site/source/docs/api_reference/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The following ``Module`` attributes affect code execution. Set them to customize
111111

112112
.. js:attribute:: Module.onAbort
113113

114-
If set, this function is called when abnormal program termination occurs. That can happen due to the C method ``abort()`` being called directly, or called from JavaScript, or due to a fatal problem such as being unable to fetch a necessary file during startup (like the wasm binary when running wasm), etc. After calling this function, program termination occurs (i.e., you can't use this to try to do something else instead of stopping; there is no possibility of recovering here).
114+
If set, this function is called when abnormal program termination occurs. That can happen due to the C method ``abort()`` being called directly, or called from JavaScript, or due to a fatal problem such as being unable to fetch a necessary file during startup (such as the Wasm binary), etc. After calling this function, program termination occurs (i.e., you can't use this to try to do something else instead of stopping; there is no possibility of recovering here).
115115

116116
.. js:attribute:: Module.onRuntimeInitialized
117117

site/source/docs/api_reference/wasm_workers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Quick Example
1818
1919
void run_in_worker()
2020
{
21-
printf("Hello from wasm worker!\n");
21+
printf("Hello from Wasm Worker!\n");
2222
}
2323
2424
int main()

site/source/docs/building_from_source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Get the ``main`` branches, or check the `Packaging <https://github.com/emscripte
1414
Building LLVM
1515
-------------
1616

17-
For using the LLVM wasm backend (recommended), simply build normal upstream LLVM from the `monorepo <https://github.com/llvm/llvm-project>`_.
18-
Include clang and wasm-ld (using something like ``-DLLVM_ENABLE_PROJECTS='lld;clang'``) and the wasm backend (which is included by default; just don't disable it), following `that project's instructions <http://llvm.org/docs/CMake.html>`_.
17+
Build LLVM from the `git repo <https://github.com/llvm/llvm-project>`_.
18+
Include clang and wasm-ld (using something like ``-DLLVM_ENABLE_PROJECTS='lld;clang'``) and the Wasm backend (which is included by default; just don't disable it), following `that project's instructions <http://llvm.org/docs/CMake.html>`_.
1919
For example, something like this can work:
2020

2121
::

site/source/docs/compiling/Building-Projects.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To build with Emscripten, you would instead use the following commands:
3030
# Run emconfigure with the normal configure command as an argument.
3131
emconfigure ./configure
3232
33-
# Run emmake with the normal make to generate wasm object files.
33+
# Run emmake with the normal make to generate Wasm object files.
3434
emmake make
3535
3636
# Compile the linked code generated by make to JavaScript + WebAssembly.
@@ -48,8 +48,8 @@ To build with Emscripten, you would instead use the following commands:
4848

4949
.. tip:: We recommend you call both *emconfigure* and *emmake* scripts in *configure*- and *CMake*-based build systems. Whether you actually **need** to call both tools depends on the build system (some systems will store the environment variables in the configure step, and others will not).
5050

51-
*Make* generates wasm object files. It may also link the object files into
52-
libraries and/or wasm executables. Unless such a build system has been modified
51+
*Make* generates Wasm object files. It may also link the object files into
52+
libraries and/or Wasm executables. Unless such a build system has been modified
5353
to also emit JavaScript output, you will need to run an additional ``emcc``
5454
command as shown above, that will emit the final runnable JavaScript and
5555
WebAssembly.
@@ -61,15 +61,15 @@ WebAssembly.
6161
file extensions are the same as *gcc* would use for the different types).
6262
Irrespective of the file extension, these files contain something that *emcc*
6363
can compile into the final JavaScript + WebAssembly (typically the contents
64-
will be wasm object files, but if you build with LTO then they will contain
64+
will be Wasm object files, but if you build with LTO then they will contain
6565
LLVM bitcode).
6666

6767
.. note::
6868

69-
Some build systems may not properly emit wasm object files using the above procedure,
69+
Some build systems may not properly emit Wasm object files using the above procedure,
7070
and you may see ``is not a valid input file`` warnings. You can run ``file`` to
7171
check what a file contains (also you can manually check if the contents
72-
start with ``\0asm`` to see if they are wasm object files, or ``BC`` if they
72+
start with ``\0asm`` to see if they are Wasm object files, or ``BC`` if they
7373
are LLVM bitcode). It is also worth running ``emmake make VERBOSE=1`` which
7474
will print out the commands it runs - you should see *emcc* being used, and
7575
not the native system compiler. If *emcc* is not used, you may need to modify
@@ -178,7 +178,7 @@ must specify :ref:`-g <emcc-g>` or one of the
178178

179179
.. code-block:: bash
180180
181-
# Compile the wasm object file to JavaScript+WebAssembly, with debug info
181+
# Compile the Wasm object file to JavaScript+WebAssembly, with debug info
182182
# -g or -gN can be used to set the debug level (N)
183183
emcc -g project.o -o project.js
184184
@@ -406,4 +406,4 @@ Troubleshooting
406406
.. note:: You can use ``llvm-nm`` to see which symbols are defined in each object file.
407407

408408
One solution is to use :ref:`dynamic-linking <Dynamic-Linking>`. This ensures that libraries are linked only once, in the final build stage.
409-
- When generating standalone wasm, make sure to invoke the ``_start`` or (for ``--no-entry``) ``_initialize`` export before attempting to use the module.
409+
- When generating standalone Wasm, make sure to invoke the ``_start`` or (for ``--no-entry``) ``_initialize`` export before attempting to use the module.

site/source/docs/compiling/WebAssembly.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ WebAssembly is emitted by default, without the need for any special flags.
2020
emcc [..args..] -sWASM=0
2121

2222
.. note:: Emscripten's WebAssembly support depends on `Binaryen <https://github.com/WebAssembly/binaryen>`_, which is provided by the emsdk (if you don't use the emsdk, you need to build it and set it up in your ``.emscripten`` file).
23-
.. note:: Deciding to compile to wasm or JS can be done at the linking stage: it doesn't affect the object files.
23+
.. note:: Deciding to compile to Wasm or JS can be done at the linking stage: it doesn't affect the object files.
2424

2525
Backends
2626
--------
2727

28-
Emscripten emits WebAssembly using the **upstream LLVM wasm backend**, since
28+
Emscripten emits WebAssembly using the **upstream LLVM Wasm backend**, since
2929
version ``1.39.0`` (October 2019). Previously emscripten also supported the
3030
old **fastcomp** backend which was removed in ``2.0.0`` (August 2020).
3131

3232
There are some differences you may notice between the two backends, if you
3333
upgrade from fastcomp to upstream:
3434

35-
* The wasm backend is strict about linking files with different features sets -
35+
* The Wasm backend is strict about linking files with different features sets -
3636
for example, if one file was built with atomics but another was not, it will
3737
error at link time. This prevents possible bugs, but may mean you need to make
3838
some build system fixes.
3939

4040
* ``WASM=0`` behaves differently in the two backends. In fastcomp we emit
41-
asm.js, while in upstream we emit JS (since not all wasm constructs can be
41+
asm.js, while in upstream we emit JS (since not all Wasm constructs can be
4242
expressed in asm.js). Also, the JS support implements the same external
43-
``WebAssembly.*`` API, so in particular startup will be async just like wasm
43+
``WebAssembly.*`` API, so in particular startup will be async just like Wasm
4444
by default, and you can control that with ``WASM_ASYNC_COMPILATION`` (even
4545
though ``WASM=0``).
4646

47-
* The wasm backend uses wasm object files by default. That means that it does
47+
* The Wasm backend uses Wasm object files by default. That means that it does
4848
codegen at the compile step, which makes the link step much faster - like a
4949
normal native compiler. For comparison, in fastcomp the compile step emits
5050
LLVM IR in object files.
@@ -67,22 +67,22 @@ upgrade from fastcomp to upstream:
6767
perform some minor types of link time optimization even without LTO being
6868
set. The LLVM backend requires actually setting LTO for those things.
6969

70-
* `wasm-ld`, the linker used by the wasm backend, requires libraries (`.a`
70+
* `wasm-ld`, the linker used by the Wasm backend, requires libraries (`.a`
7171
archives) to contain symbol indexes. This matches the behaviour the native
7272
GNU linker. While `emar` will create such indexes by default, native tools
7373
such as GNU `ar` and GNU `strip` are not aware of the WebAssembly object
7474
format and cannot create archive indexes. In particular, if you run GNU
7575
`strip` on an archive file that contains WebAssembly object files it will
7676
remove the index which makes the archive unusable at link time.
7777

78-
* Also see the `blocker bugs on the wasm backend <https://github.com/emscripten-core/emscripten/projects/1>`_, and the `wasm backend tagged issues <https://github.com/emscripten-core/emscripten/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3A"LLVM+wasm+backend">`_.
78+
* Also see the `blocker bugs on the Wasm backend <https://github.com/emscripten-core/emscripten/projects/1>`_, and the `Wasm backend tagged issues <https://github.com/emscripten-core/emscripten/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3A"LLVM+wasm+backend">`_.
7979

8080
Trapping
8181
========
8282

8383
WebAssembly can trap - throw an exception - on things like division by zero, rounding a very large float to an int, and so forth. In asm.js such things were silently ignored, as in JavaScript they do not throw, so this is a difference between JavaScript and WebAssembly that you may notice, with the browser reporting an error like ``float unrepresentable in integer range``, ``integer result unrepresentable``, ``integer overflow``, or ``Out of bounds Trunc operation``.
8484

85-
The LLVM wasm backend avoids traps by adding more code around each possible trap (basically clamping the value if it would trap). This can increase code size and decrease speed, if you don't need that extra code. The proper solution for this is to use newer wasm instructions that do not trap, by calling emcc or clang with ``-mnontrapping-fptoint``. That code may not run in older VMs, though.
85+
The LLVM Wasm backend avoids traps by adding more code around each possible trap (basically clamping the value if it would trap). This can increase code size and decrease speed, if you don't need that extra code. The proper solution for this is to use newer Wasm instructions that do not trap, by calling emcc or clang with ``-mnontrapping-fptoint``. That code may not run in older VMs, though.
8686

8787
Compiler output
8888
===============
@@ -112,7 +112,7 @@ Another noticeable effect is that WebAssembly is compiled asynchronously by defa
112112
Web server setup
113113
================
114114

115-
To serve wasm in the most efficient way over the network, make sure your web server has the proper MIME type for ``.wasm`` files, which is application/wasm. That will allow streaming compilation, where the browser can start to compile code as it downloads.
115+
To serve Wasm in the most efficient way over the network, make sure your web server has the proper MIME type for ``.wasm`` files, which is application/wasm. That will allow streaming compilation, where the browser can start to compile code as it downloads.
116116

117117
In Apache, you can do this with
118118

site/source/docs/contributing/developers_guide.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ The :ref:`Emscripten Compiler Frontend (emcc) <emccdoc>` is a python script that
7979
builds and integrates with the Emscripten system libraries, both the
8080
compiled ones and the ones implemented in JS.
8181
- **emcc** then calls `emscripten.py <https://github.com/emscripten-core/emscripten/blob/main/emscripten.py>`_
82-
which performs the final transformation to wasm (including invoking
82+
which performs the final transformation to Wasm (including invoking
8383
**wasm-emscripten-finalize** from Binaryen) and calls the JS compiler
8484
(see ``src/compiler.js`` and related files) which emits the JS.
85-
- If optimizing wasm, **emcc** will then call **wasm-opt**, run meta-dce, and
85+
- If optimizing Wasm, **emcc** will then call **wasm-opt**, run meta-dce, and
8686
other useful things. It will also run JS optimizations on the JS that is
87-
emitted alongside the wasm.
87+
emitted alongside the Wasm.
8888

8989
Emscripten Test Suite
9090
=====================

0 commit comments

Comments
 (0)