[js] Update docs re v8 support
We require at least node v6 (which means v8 v5.0) since
7ba19e7586 so updated the manual to
reflect this.
This commit is contained in:
parent
f17b6bda93
commit
e30dfeaab9
1 changed files with 3 additions and 17 deletions
|
|
@ -89,24 +89,10 @@ $ swig -javascript -jsc example.i</pre>
|
||||||
<pre>
|
<pre>
|
||||||
$ swig -c++ -javascript -jsc example.i</pre>
|
$ swig -c++ -javascript -jsc example.i</pre>
|
||||||
</div>
|
</div>
|
||||||
<p>The V8 code that SWIG generates should work with most versions from 3.11.10.
|
<p>The V8 code that SWIG generates requires at least V8 5.0. Keep in mind
|
||||||
However, the only early version that receives some testing is 3.14.5, which is
|
that this is theV8 version, not Node.js. To give some perspective, Node.js v6.0
|
||||||
still shipped with Ubuntu for some reason. Other than that it's probably safer
|
|
||||||
to assume that versions earlier than 5.0 are no longer supported. Keep in mind
|
|
||||||
that these are V8 versions, not Node.js. To give some perspective, Node.js v6.0
|
|
||||||
uses V8 5.0, v12.0 - 7.4, v14.0 - 8.1...</p>
|
uses V8 5.0, v12.0 - 7.4, v14.0 - 8.1...</p>
|
||||||
<p>The API headers for V8 >= 4.3.10 define constants which SWIG can use to
|
<p>To generate code for V8, you would run swig like so:</p>
|
||||||
determine the V8 version it is compiling for. For versions < 4.3.10, you
|
|
||||||
need to specify the V8 version when running SWIG. This is specified as a hex
|
|
||||||
constant, but the constant is read as pairs of decimal digits, so for V8
|
|
||||||
3.25.30 use constant 0x032530. This scheme can't represent components > 99,
|
|
||||||
but this constant is only useful for V8 < 4.3.10, and no V8 versions from
|
|
||||||
that era had a component > 99. For example:</p>
|
|
||||||
<div class="shell">
|
|
||||||
<pre>
|
|
||||||
$ swig -c++ -javascript -v8 -DV8_VERSION=0x032530 example.i</pre>
|
|
||||||
</div>
|
|
||||||
<p>If you're targeting V8 >= 4.3.10, you would just run swig like so:</p>
|
|
||||||
<div class="shell">
|
<div class="shell">
|
||||||
<pre>
|
<pre>
|
||||||
$ swig -c++ -javascript -v8 example.i</pre>
|
$ swig -c++ -javascript -v8 example.i</pre>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue