Update documentation for V8
This commit is contained in:
parent
b8d7cc21b9
commit
0a07d8f770
1 changed files with 11 additions and 0 deletions
|
|
@ -88,6 +88,12 @@ $ swig -javascript -jsc example.i</pre>
|
|||
<pre>
|
||||
$ swig -c++ -javascript -jsc example.i</pre>
|
||||
</div>
|
||||
<p>The V8 code that SWIG generates should work with most versions from 3.11.10 up to 3.29.14 and later.</p>
|
||||
<p>Specify the V8 version when running SWIG (e.g. 3.25.30)</p>
|
||||
<div class="shell">
|
||||
<pre>
|
||||
$ swig -c++ -javascript -v8 -DV8_VERSION=0x032530 example.i
|
||||
</div>
|
||||
<p>This creates a C/C++ source file <code>example_wrap.c</code> or <code>example_wrap.cxx</code>. The generated C source file contains the low-level wrappers that need to be compiled and linked with the rest of your C/C++ application to create an extension module.</p>
|
||||
<p>The name of the wrapper file is derived from the name of the input file. For example, if the input file is <code>example.i</code>, the name of the wrapper file is <code>example_wrap.c</code>. To change this, you can use the -o option. The wrapped module will export one function which must be called to register the module with the Javascript interpreter. For example, if your module is named <code>example</code> the corresponding initializer for JavascriptCore would be</p>
|
||||
<div class="code">
|
||||
|
|
@ -129,6 +135,11 @@ $ make check-javascript-examples ENGINE=jsc</pre>
|
|||
<pre>
|
||||
$ make check-javascript-test-suite ENGINE=jsc</pre>
|
||||
</div>
|
||||
<p>You can specify a specific <code>V8</code> version for running the examples and tests</p>
|
||||
<div class="shell">
|
||||
<pre>
|
||||
$ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8</pre>
|
||||
</div>
|
||||
|
||||
<H3><a name="Javascript_known_issues"></a>26.2.3 Known Issues</H3>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue