@@ -317,8 +317,7 @@ Implement a C API in JavaScript
317
317
===============================
318
318
319
319
It is possible to implement a C API in JavaScript! This is the approach
320
- that was used to write Emscripten's implementations of :term: `SDL ` and
321
- *libc *.
320
+ used in many of Emscripten's libraries, like SDL1 and OpenGL.
322
321
323
322
You can use it to write your own APIs to call from C/C++. To do this
324
323
you define the interface, decorating with ``extern `` to mark the methods
@@ -328,7 +327,7 @@ default). When compiling the C code, the compiler looks in the JavaScript
328
327
libraries for relevant external symbols.
329
328
330
329
By default, the implementation is added to **library.js ** (and this is
331
- where you'll find the Emscripten implementation of *libc *). You can put
330
+ where you'll find parts of Emscripten's *libc *). You can put
332
331
the JavaScript implementation in your own library file and add it using
333
332
the :ref: `emcc option <emcc-js-library >` ``--js-library ``. See
334
333
`test_js_libraries `_ in **tests/test_other.py ** for a complete working
@@ -401,7 +400,7 @@ key-value pairs are special. Interior code inside a function can
401
400
have arbitrary JS, of course).
402
401
403
402
To avoid this limitation of JS libraries, you can put code in another file using
404
- the ``--pre-js `` OR ``--post-js `` options, which allow arbitary normal
403
+ the ``--pre-js `` or ``--post-js `` options, which allow arbitary normal
405
404
JS, and it is included and optimized with the rest of the output. That is
406
405
the recommended approach for most cases. Another option is another ``<script> `` tag.
407
406
0 commit comments