aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/bluequad.css8
-rw-r--r--doc/contact.html4
-rw-r--r--doc/ext_buffer.html4
-rw-r--r--doc/ext_c_api.html4
-rw-r--r--doc/ext_ffi.html4
-rw-r--r--doc/ext_ffi_api.html4
-rw-r--r--doc/ext_ffi_semantics.html4
-rw-r--r--doc/ext_ffi_tutorial.html4
-rw-r--r--doc/ext_jit.html8
-rw-r--r--doc/ext_profiler.html4
-rw-r--r--doc/extensions.html5
-rw-r--r--doc/faq.html195
-rw-r--r--doc/install.html242
-rw-r--r--doc/luajit.html53
-rw-r--r--doc/running.html5
-rw-r--r--doc/status.html105
16 files changed, 65 insertions, 588 deletions
diff --git a/doc/bluequad.css b/doc/bluequad.css
index 14a0d1b9..7399f625 100644
--- a/doc/bluequad.css
+++ b/doc/bluequad.css
@@ -206,11 +206,9 @@ img.right {
206.ext { 206.ext {
207 color: #ff8000; 207 color: #ff8000;
208} 208}
209.new { 209.note {
210 font-size: 6pt; 210 padding: 0.5em 1em;
211 vertical-align: middle; 211 border-left: 3px solid #bfcfff;
212 background: #ff8000;
213 color: #ffffff;
214} 212}
215#site { 213#site {
216 clear: both; 214 clear: both;
diff --git a/doc/contact.html b/doc/contact.html
index 478c4bff..cc4d8c72 100644
--- a/doc/contact.html
+++ b/doc/contact.html
@@ -46,9 +46,9 @@
46<a href="ext_profiler.html">Profiler</a> 46<a href="ext_profiler.html">Profiler</a>
47</li></ul> 47</li></ul>
48</li><li> 48</li><li>
49<a href="status.html">Status</a> 49<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
50</li><li> 50</li><li>
51<a href="faq.html">FAQ</a> 51<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
52</li><li> 52</li><li>
53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
54</li></ul> 54</li></ul>
diff --git a/doc/ext_buffer.html b/doc/ext_buffer.html
index 35f01c9a..bfaa24cb 100644
--- a/doc/ext_buffer.html
+++ b/doc/ext_buffer.html
@@ -57,9 +57,9 @@
57<a href="ext_profiler.html">Profiler</a> 57<a href="ext_profiler.html">Profiler</a>
58</li></ul> 58</li></ul>
59</li><li> 59</li><li>
60<a href="status.html">Status</a> 60<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
61</li><li> 61</li><li>
62<a href="faq.html">FAQ</a> 62<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
63</li><li> 63</li><li>
64<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 64<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
65</li></ul> 65</li></ul>
diff --git a/doc/ext_c_api.html b/doc/ext_c_api.html
index ab72d19a..d5e6bb60 100644
--- a/doc/ext_c_api.html
+++ b/doc/ext_c_api.html
@@ -46,9 +46,9 @@
46<a href="ext_profiler.html">Profiler</a> 46<a href="ext_profiler.html">Profiler</a>
47</li></ul> 47</li></ul>
48</li><li> 48</li><li>
49<a href="status.html">Status</a> 49<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
50</li><li> 50</li><li>
51<a href="faq.html">FAQ</a> 51<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
52</li><li> 52</li><li>
53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
54</li></ul> 54</li></ul>
diff --git a/doc/ext_ffi.html b/doc/ext_ffi.html
index e8e5565d..eaa176b6 100644
--- a/doc/ext_ffi.html
+++ b/doc/ext_ffi.html
@@ -46,9 +46,9 @@
46<a href="ext_profiler.html">Profiler</a> 46<a href="ext_profiler.html">Profiler</a>
47</li></ul> 47</li></ul>
48</li><li> 48</li><li>
49<a href="status.html">Status</a> 49<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
50</li><li> 50</li><li>
51<a href="faq.html">FAQ</a> 51<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
52</li><li> 52</li><li>
53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
54</li></ul> 54</li></ul>
diff --git a/doc/ext_ffi_api.html b/doc/ext_ffi_api.html
index ea03168a..500a2143 100644
--- a/doc/ext_ffi_api.html
+++ b/doc/ext_ffi_api.html
@@ -51,9 +51,9 @@ td.abiparam { font-weight: bold; width: 6em; }
51<a href="ext_profiler.html">Profiler</a> 51<a href="ext_profiler.html">Profiler</a>
52</li></ul> 52</li></ul>
53</li><li> 53</li><li>
54<a href="status.html">Status</a> 54<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
55</li><li> 55</li><li>
56<a href="faq.html">FAQ</a> 56<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
57</li><li> 57</li><li>
58<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 58<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
59</li></ul> 59</li></ul>
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html
index 419ef07a..5ba82a1e 100644
--- a/doc/ext_ffi_semantics.html
+++ b/doc/ext_ffi_semantics.html
@@ -51,9 +51,9 @@ td.convop { font-style: italic; width: 40%; }
51<a href="ext_profiler.html">Profiler</a> 51<a href="ext_profiler.html">Profiler</a>
52</li></ul> 52</li></ul>
53</li><li> 53</li><li>
54<a href="status.html">Status</a> 54<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
55</li><li> 55</li><li>
56<a href="faq.html">FAQ</a> 56<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
57</li><li> 57</li><li>
58<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 58<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
59</li></ul> 59</li></ul>
diff --git a/doc/ext_ffi_tutorial.html b/doc/ext_ffi_tutorial.html
index 3cf4862a..a5236f0b 100644
--- a/doc/ext_ffi_tutorial.html
+++ b/doc/ext_ffi_tutorial.html
@@ -53,9 +53,9 @@ td.idiomlua b { font-weight: normal; color: #2142bf; }
53<a href="ext_profiler.html">Profiler</a> 53<a href="ext_profiler.html">Profiler</a>
54</li></ul> 54</li></ul>
55</li><li> 55</li><li>
56<a href="status.html">Status</a> 56<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
57</li><li> 57</li><li>
58<a href="faq.html">FAQ</a> 58<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
59</li><li> 59</li><li>
60<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 60<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
61</li></ul> 61</li></ul>
diff --git a/doc/ext_jit.html b/doc/ext_jit.html
index 7bf9f343..dd136d65 100644
--- a/doc/ext_jit.html
+++ b/doc/ext_jit.html
@@ -46,9 +46,9 @@
46<a href="ext_profiler.html">Profiler</a> 46<a href="ext_profiler.html">Profiler</a>
47</li></ul> 47</li></ul>
48</li><li> 48</li><li>
49<a href="status.html">Status</a> 49<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
50</li><li> 50</li><li>
51<a href="faq.html">FAQ</a> 51<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
52</li><li> 52</li><li>
53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
54</li></ul> 54</li></ul>
@@ -135,7 +135,9 @@ Contains the LuaJIT version string.
135<h3 id="jit_version_num"><tt>jit.version_num</tt></h3> 135<h3 id="jit_version_num"><tt>jit.version_num</tt></h3>
136<p> 136<p>
137Contains the version number of the LuaJIT core. Version xx.yy.zz 137Contains the version number of the LuaJIT core. Version xx.yy.zz
138is represented by the decimal number xxyyzz. 138is represented by the decimal number xxyyzz.<br>
139<b>DEPRECATED after the switch to
140<a href="https://luajit.org/status.html#release"><span class="ext">&raquo;</span>&nbsp;rolling releases</a>. zz is frozen at 99.</b>
139</p> 141</p>
140 142
141<h3 id="jit_os"><tt>jit.os</tt></h3> 143<h3 id="jit_os"><tt>jit.os</tt></h3>
diff --git a/doc/ext_profiler.html b/doc/ext_profiler.html
index 18880239..81b5d773 100644
--- a/doc/ext_profiler.html
+++ b/doc/ext_profiler.html
@@ -46,9 +46,9 @@
46<a class="current" href="ext_profiler.html">Profiler</a> 46<a class="current" href="ext_profiler.html">Profiler</a>
47</li></ul> 47</li></ul>
48</li><li> 48</li><li>
49<a href="status.html">Status</a> 49<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
50</li><li> 50</li><li>
51<a href="faq.html">FAQ</a> 51<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
52</li><li> 52</li><li>
53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 53<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
54</li></ul> 54</li></ul>
diff --git a/doc/extensions.html b/doc/extensions.html
index c7ace015..eb591d1e 100644
--- a/doc/extensions.html
+++ b/doc/extensions.html
@@ -63,14 +63,15 @@ td.excinterop {
63<a href="ext_profiler.html">Profiler</a> 63<a href="ext_profiler.html">Profiler</a>
64</li></ul> 64</li></ul>
65</li><li> 65</li><li>
66<a href="status.html">Status</a> 66<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
67</li><li> 67</li><li>
68<a href="faq.html">FAQ</a> 68<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
69</li><li> 69</li><li>
70<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 70<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
71</li></ul> 71</li></ul>
72</div> 72</div>
73<div id="main"> 73<div id="main">
74
74<p> 75<p>
75LuaJIT is fully upwards-compatible with Lua 5.1. It supports all 76LuaJIT is fully upwards-compatible with Lua 5.1. It supports all
76<a href="https://www.lua.org/manual/5.1/manual.html#5"><span class="ext">&raquo;</span>&nbsp;standard Lua 77<a href="https://www.lua.org/manual/5.1/manual.html#5"><span class="ext">&raquo;</span>&nbsp;standard Lua
diff --git a/doc/faq.html b/doc/faq.html
deleted file mode 100644
index a53a7512..00000000
--- a/doc/faq.html
+++ /dev/null
@@ -1,195 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4<title>Frequently Asked Questions (FAQ)</title>
5<meta charset="utf-8">
6<meta name="Copyright" content="Copyright (C) 2005-2023">
7<meta name="Language" content="en">
8<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
9<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
10<style type="text/css">
11dd { margin-left: 1.5em; }
12</style>
13</head>
14<body>
15<div id="site">
16<a href="https://luajit.org"><span>Lua<span id="logo">JIT</span></span></a>
17</div>
18<div id="head">
19<h1>Frequently Asked Questions (FAQ)</h1>
20</div>
21<div id="nav">
22<ul><li>
23<a href="luajit.html">LuaJIT</a>
24<ul><li>
25<a href="https://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
26</li><li>
27<a href="install.html">Installation</a>
28</li><li>
29<a href="running.html">Running</a>
30</li></ul>
31</li><li>
32<a href="extensions.html">Extensions</a>
33<ul><li>
34<a href="ext_ffi.html">FFI Library</a>
35<ul><li>
36<a href="ext_ffi_tutorial.html">FFI Tutorial</a>
37</li><li>
38<a href="ext_ffi_api.html">ffi.* API</a>
39</li><li>
40<a href="ext_ffi_semantics.html">FFI Semantics</a>
41</li></ul>
42</li><li>
43<a href="ext_buffer.html">String Buffers</a>
44</li><li>
45<a href="ext_jit.html">jit.* Library</a>
46</li><li>
47<a href="ext_c_api.html">Lua/C API</a>
48</li><li>
49<a href="ext_profiler.html">Profiler</a>
50</li></ul>
51</li><li>
52<a href="status.html">Status</a>
53</li><li>
54<a class="current" href="faq.html">FAQ</a>
55</li><li>
56<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
57</li></ul>
58</div>
59<div id="main">
60<dl id="info">
61<dt>Q: Where can I learn more about LuaJIT and Lua?</dt>
62<dd>
63<ul style="padding: 0;">
64<li>The <a href="https://luajit.org/list.html"><span class="ext">&raquo;</span>&nbsp;LuaJIT mailing list</a> focuses on topics
65related to LuaJIT.</li>
66<li>News about Lua itself can be found at the
67<a href="https://www.lua.org/lua-l.html"><span class="ext">&raquo;</span>&nbsp;Lua mailing list</a>.
68The mailing list archives are worth checking out for older postings
69about LuaJIT.</li>
70<li>The <a href="https://lua.org"><span class="ext">&raquo;</span>&nbsp;main Lua.org site</a> has complete
71<a href="https://www.lua.org/docs.html"><span class="ext">&raquo;</span>&nbsp;documentation</a> of the language
72and links to books and papers about Lua.</li>
73<li>The community-managed <a href="http://lua-users.org/wiki/"><span class="ext">&raquo;</span>&nbsp;Lua Wiki</a>
74has information about diverse topics.</li>
75</ul></dd>
76</dl>
77
78<dl id="tech">
79<dt>Q: Where can I learn more about the compiler technology used by LuaJIT?</dt>
80<dd>
81Please use the following Google Scholar searches to find relevant papers:<br>
82Search for: <a href="https://scholar.google.com/scholar?q=Trace+Compiler"><span class="ext">&raquo;</span>&nbsp;Trace Compiler</a><br>
83Search for: <a href="https://scholar.google.com/scholar?q=JIT+Compiler"><span class="ext">&raquo;</span>&nbsp;JIT Compiler</a><br>
84Search for: <a href="https://scholar.google.com/scholar?q=Dynamic+Language+Optimizations"><span class="ext">&raquo;</span>&nbsp;Dynamic Language Optimizations</a><br>
85Search for: <a href="https://scholar.google.com/scholar?q=SSA+Form"><span class="ext">&raquo;</span>&nbsp;SSA Form</a><br>
86Search for: <a href="https://scholar.google.com/scholar?q=Linear+Scan+Register+Allocation"><span class="ext">&raquo;</span>&nbsp;Linear Scan Register Allocation</a><br>
87Here is a list of the <a href="http://lua-users.org/lists/lua-l/2009-11/msg00089.html"><span class="ext">&raquo;</span>&nbsp;innovative features in LuaJIT</a>.<br>
88And, you know, reading the source is of course the only way to enlightenment.
89</dd>
90</dl>
91
92<dl id="arg">
93<dt>Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?<br>
94Q: My vararg functions fail after switching to LuaJIT!</dt>
95<dd>LuaJIT is compatible to the Lua 5.1 language standard. It doesn't
96support the implicit <tt>arg</tt> parameter for old-style vararg
97functions from Lua 5.0.<br>Please convert your code to the
98<a href="https://www.lua.org/manual/5.1/manual.html#2.5.9"><span class="ext">&raquo;</span>&nbsp;Lua 5.1
99vararg syntax</a>.</dd>
100</dl>
101
102<dl id="x87">
103<dt>Q: Why do I get this error: "bad FPU precision"?<br>
104<dt>Q: I get weird behavior after initializing Direct3D.<br>
105<dt>Q: Some FPU operations crash after I load a Delphi DLL.<br>
106</dt>
107<dd>
108
109DirectX/Direct3D (up to version 9) sets the x87 FPU to single-precision
110mode by default. This violates the Windows ABI and interferes with the
111operation of many programs &mdash; LuaJIT is affected, too. Please make
112sure you always use the <tt>D3DCREATE_FPU_PRESERVE</tt> flag when
113initializing Direct3D.<br>
114
115Direct3D version 10 or higher do not show this behavior anymore.
116Consider testing your application with older versions, too.<br>
117
118Similarly, the Borland/Delphi runtime modifies the FPU control word and
119enables FP exceptions. Of course, this violates the Windows ABI, too.
120Please check the Delphi docs for the Set8087CW method.</dd>
121</dl>
122
123<dl id="ctrlc">
124<dt>Q: Sometimes Ctrl-C fails to stop my Lua program. Why?</dt>
125<dd>The interrupt signal handler sets a Lua debug hook. But this is
126ignored by compiled code. If your program is running in a tight loop
127and never falls back to the interpreter, the debug hook never runs and
128can't throw the "interrupted!" error.<br>
129You have to press Ctrl-C twice to stop your program. That's similar
130to when it's stuck running inside a C function under the Lua interpreter.</dd>
131</dl>
132
133<dl id="order">
134<dt>Q: Table iteration with <tt>pairs()</tt> does not result in the same order?</dt>
135<dd>The order of table iteration is explicitly <b>undefined</b> by
136the Lua language standard.<br>
137Different Lua implementations or versions may use different orders for
138otherwise identical tables. Different ways of constructing a table may
139result in different orders, too.<br>
140Due to improved VM security, LuaJIT 2.1 may even use a different order
141on separate VM invocations or when string keys are newly interned.<br><br>
142If your program relies on a deterministic order, it has a bug. Rewrite it,
143so it doesn't rely on the key order. Or sort the table keys, if you must.</dd>
144</dl>
145
146<dl id="sandbox">
147<dt>Q: Can Lua code be safely sandboxed?</dt>
148<dd>
149Maybe for an extremely restricted subset of Lua and if you relentlessly
150scrutinize every single interface function you offer to the untrusted code.<br>
151
152Although Lua provides some sandboxing functionality (<tt>setfenv()</tt>, hooks),
153it's very hard to get this right even for the Lua core libraries. Of course,
154you'll need to inspect any extension library, too. And there are libraries
155that are inherently unsafe, e.g. the <a href="ext_ffi.html">FFI library</a>.<br>
156
157More reading material at the <a href="http://lua-users.org/wiki/SandBoxes"><span class="ext">&raquo;</span>&nbsp;Lua Wiki</a> and <a href="https://en.wikipedia.org/wiki/Sandbox_(computer_security)"><span class="ext">&raquo;</span>&nbsp;Wikipedia</a>.<br><br>
158
159Relatedly, <b>loading untrusted bytecode is not safe!</b><br>
160
161It's trivial to crash the Lua or LuaJIT VM with maliciously crafted bytecode.
162This is well known and there's no bytecode verification on purpose, so please
163don't report a bug about it. Check the <tt>mode</tt> parameter for the
164<tt>load*()</tt> functions to disable loading of bytecode.<br><br>
165
166<b>In general, the only promising approach is to sandbox Lua code at the
167process level and not the VM level.</b>
168</dd>
169</dl>
170
171<dl id="arch">
172<dt>Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?</dt>
173<dd>Because it's a compiler &mdash; it needs to generate native
174machine code. This means the code generator must be ported to each
175architecture. And the fast interpreter is written in assembler and
176must be ported, too. This is quite an undertaking.<br>
177The <a href="install.html">install documentation</a> shows the supported
178architectures.<br>
179Other architectures may follow based on sufficient user demand and
180market-relevance of the architecture. Sponsoring is required to develop
181the port itself, to integrate it and to continuously maintain it in the
182actively developed branches.</dd>
183</dl>
184<br class="flush">
185</div>
186<div id="foot">
187<hr class="hide">
188Copyright &copy; 2005-2023
189<span class="noprint">
190&middot;
191<a href="contact.html">Contact</a>
192</span>
193</div>
194</body>
195</html>
diff --git a/doc/install.html b/doc/install.html
index 0ccd37aa..be721031 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -20,7 +20,7 @@ table.compat tr.compathead td {
20 font-weight: bold; 20 font-weight: bold;
21 border-bottom: 2px solid #bfcfff; 21 border-bottom: 2px solid #bfcfff;
22} 22}
23td.compatname, td.compatver { 23td.compatname {
24 width: 10%; 24 width: 10%;
25} 25}
26td.compatbits { 26td.compatbits {
@@ -69,18 +69,18 @@ td.compatx {
69<a href="ext_profiler.html">Profiler</a> 69<a href="ext_profiler.html">Profiler</a>
70</li></ul> 70</li></ul>
71</li><li> 71</li><li>
72<a href="status.html">Status</a> 72<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
73</li><li> 73</li><li>
74<a href="faq.html">FAQ</a> 74<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
75</li><li> 75</li><li>
76<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 76<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
77</li></ul> 77</li></ul>
78</div> 78</div>
79<div id="main"> 79<div id="main">
80<p> 80<p>
81LuaJIT is only distributed as a source package. This page explains 81LuaJIT is only distributed as source code &mdash; get it from the
82how to build and install LuaJIT with different operating systems 82<a href="https://luajit.org/download.html"><span class="ext">&raquo;</span>&nbsp;git repository</a>. This page explains how to build
83and C&nbsp;compilers. 83and install the LuaJIT binary and library for different operating systems.
84</p> 84</p>
85<p> 85<p>
86For the impatient (on POSIX systems): 86For the impatient (on POSIX systems):
@@ -90,201 +90,21 @@ make &amp;&amp; sudo make install
90</pre> 90</pre>
91 91
92<h2 id="req">Requirements</h2> 92<h2 id="req">Requirements</h2>
93<h3 id="systems">Systems</h3>
94<p> 93<p>
95LuaJIT currently builds out-of-the box on most systems: 94LuaJIT currently builds out-of-the box on most systems. Please check the
95supported operating systems and CPU architectures on the
96<a href="https://luajit.org/status.html"><span class="ext">&raquo;</span>&nbsp;status page</a>.
96</p> 97</p>
97<table class="compat">
98<tr class="compathead">
99<td class="compatname">OS</td>
100<td class="compatver">Min. Version</td>
101<td class="compatx">Requirements</td>
102<td class="compatx">LuaJIT Versions</td>
103</tr>
104<tr class="odd separate">
105<td class="compatname"><a href="#windows">Windows</a></td>
106<td class="compatver">7</td>
107<td class="compatx">x86 or x64, ARM64: TBA</td>
108<td class="compatx">v2.0 &ndash;</td>
109</tr>
110<tr class="even">
111<td class="compatname"><a href="#posix">Linux</a></td>
112<td class="compatver">&nbsp;</td>
113<td class="compatx">&nbsp;</td>
114<td class="compatx">v2.0 &ndash;</td>
115</tr>
116<tr class="odd">
117<td class="compatname"><a href="#posix">*BSD</a></td>
118<td class="compatver">&nbsp;</td>
119<td class="compatx">&nbsp;</td>
120<td class="compatx">v2.0 &ndash;</td>
121</tr>
122<tr class="even">
123<td class="compatname"><a href="#posix">macOS (OSX)</a></td>
124<td class="compatver">10.4</td>
125<td class="compatx">&nbsp;</td>
126<td class="compatx">v2.1 &ndash;</td>
127</tr>
128<tr class="odd">
129<td class="compatname"><a href="#posix">POSIX</a></td>
130<td class="compatver">&nbsp;</td>
131<td class="compatx">mmap, dlopen</td>
132<td class="compatx">v2.0 &ndash;</td>
133</tr>
134<tr class="even separate">
135<td class="compatname"><a href="#android">Android</a></td>
136<td class="compatver">4.0</td>
137<td class="compatx">Recent Android NDK</td>
138<td class="compatx">v2.0 &ndash;</td>
139</tr>
140<tr class="odd">
141<td class="compatname"><a href="#ios">iOS</a></td>
142<td class="compatver">3.0</td>
143<td class="compatx">Xcode iOS SDK</td>
144<td class="compatx">v2.1 &ndash;</td>
145</tr>
146<tr class="even separate">
147<td class="compatname"><a href="#consoles">PS3</a></td>
148<td class="compatver">&nbsp;</td>
149<td class="compatx">PS3 SDK</td>
150<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
151</tr>
152<tr class="odd">
153<td class="compatname"><a href="#consoles">PS4</a></td>
154<td class="compatver">&nbsp;</td>
155<td class="compatx">PS4 SDK (ORBIS)</td>
156<td class="compatx">v2.0 &ndash;</td>
157</tr>
158<tr class="even">
159<td class="compatname"><a href="#consoles">PS5</a></td>
160<td class="compatver">&nbsp;</td>
161<td class="compatx">PS5 SDK (PROSPERO)</td>
162<td class="compatx">v2.1 &ndash;</td>
163</tr>
164<tr class="odd">
165<td class="compatname"><a href="#consoles">PS Vita</a></td>
166<td class="compatver">&nbsp;</td>
167<td class="compatx">PS Vita SDK (PSP2)</td>
168<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
169</tr>
170<tr class="even">
171<td class="compatname"><a href="#consoles">Xbox 360</a></td>
172<td class="compatver">&nbsp;</td>
173<td class="compatx">Xbox 360 SDK (XEDK)</td>
174<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
175</tr>
176<tr class="odd">
177<td class="compatname"><a href="#consoles">Xbox One</a></td>
178<td class="compatver">&nbsp;</td>
179<td class="compatx">Xbox One SDK (DURANGO)</td>
180<td class="compatx">v2.1 &ndash;</td>
181</tr>
182<tr class="even">
183<td class="compatname"><a href="#consoles">Nintendo Switch</a></td>
184<td class="compatver">&nbsp;</td>
185<td class="compatx">NintendoSDK + NX Addon</td>
186<td class="compatx">v2.1 &ndash;</td>
187</tr>
188</table>
189<p>
190The codebase has compatibility defines for some more systems, but
191without official support.
192</p>
193<h3 id="toolchains">Toolchains</h3>
194<p> 98<p>
195Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or 99Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or
196MSVC++. 100MSVC++.
197</p> 101</p>
198<p> 102<p>
199The Makefile-based build system requires GNU Make and supports 103The Makefile-based build system requires GNU Make and supports
200cross-builds. Batch files are provided for MSVC++ builds and console
201cross-builds. 104cross-builds.
202</p> 105</p>
203<h3 id="architectures">CPU Architectures</h3>
204<table class="compat">
205<tr class="compathead">
206<td class="compatname">CPU</td>
207<td class="compatbits">Bits</td>
208<td class="compatx">Requirements</td>
209<td class="compatx">Variants</td>
210<td class="compatx">LuaJIT Versions</td>
211</tr>
212<tr class="odd separate">
213<td class="compatname">x86</td>
214<td class="compatbits">32</td>
215<td class="compatx">v2.1+: SSE2</td>
216<td class="compatx">&nbsp;</td>
217<td class="compatx">v2.0 &ndash;</td>
218</tr>
219<tr class="even">
220<td class="compatname">x64</td>
221<td class="compatbits">64</td>
222<td class="compatx">&nbsp;</td>
223<td class="compatx">&nbsp;</td>
224<td class="compatx">v2.0 &ndash;</td>
225</tr>
226<tr class="odd">
227<td class="compatname">ARM</td>
228<td class="compatbits">32</td>
229<td class="compatx">ARMv5+, ARM9E+</td>
230<td class="compatx">hard-fp + soft-fp</td>
231<td class="compatx">v2.0 &ndash;</td>
232</tr>
233<tr class="even">
234<td class="compatname">ARM64</td>
235<td class="compatbits">64</td>
236<td class="compatx">&nbsp;</td>
237<td class="compatx">ARM64le + ARM64be</td>
238<td class="compatx">v2.1 &ndash;</td>
239</tr>
240<tr class="odd">
241<td class="compatname">PPC32</td>
242<td class="compatbits">32</td>
243<td class="compatx">&nbsp;</td>
244<td class="compatx">hard-fp + soft-fp</td>
245<td class="compatx">v2.0 &ndash; v2.1 EOL</td>
246</tr>
247<tr class="even">
248<td class="compatname">PPC/e500</td>
249<td class="compatbits">32</td>
250<td class="compatx">e500v2</td>
251<td class="compatx">&nbsp;</td>
252<td class="compatx">v2.0 EOL</td>
253</tr>
254<tr class="odd">
255<td class="compatname">MIPS32</td>
256<td class="compatbits">32</td>
257<td class="compatx">MIPS32r1 &ndash; r5</td>
258<td class="compatx">hard-fp + soft-fp</td>
259<td class="compatx">v2.0 &ndash;</td>
260</tr>
261<tr class="even">
262<td class="compatname">MIPS64</td>
263<td class="compatbits">64</td>
264<td class="compatx">MIPS64r1 &ndash; r5</td>
265<td class="compatx">hard-fp + soft-fp</td>
266<td class="compatx">v2.1 &ndash;</td>
267</tr>
268<tr class="odd">
269<td class="compatname">MIPS64</td>
270<td class="compatbits">64</td>
271<td class="compatx">MIPS64r6</td>
272<td class="compatx">hard-fp + soft-fp</td>
273<td class="compatx">v2.1 EOL</td>
274</tr>
275<tr class="even">
276<td class="compatname">RISC-V</td>
277<td class="compatbits">64</td>
278<td class="compatx">RVA22+</td>
279<td class="compatx">&nbsp;</td>
280<td class="compatx">TBA</td>
281</tr>
282</table>
283<p> 106<p>
284There are no plans to add historic architectures or to continue support 107Batch files are provided for MSVC++ builds and console cross-builds.
285for end-of-life (EOL) architectures, for which no new CPUs are commonly
286available anymore. Likewise, there are no plans to support marginal
287and/or de-facto-dead architectures.
288</p> 108</p>
289 109
290<h2>Configuring LuaJIT</h2> 110<h2>Configuring LuaJIT</h2>
@@ -294,7 +114,6 @@ Usually there is no need to tweak the settings. The following files
294hold all user-configurable settings: 114hold all user-configurable settings:
295</p> 115</p>
296<ul> 116<ul>
297<li><tt>src/luaconf.h</tt> sets some configuration variables.</li>
298<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX 117<li><tt>Makefile</tt> has settings for <b>installing</b> LuaJIT (POSIX
299only).</li> 118only).</li>
300<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT 119<li><tt>src/Makefile</tt> has settings for <b>compiling</b> LuaJIT
@@ -317,23 +136,11 @@ Please check the note about the
317<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2> 136<h2 id="posix">POSIX Systems (Linux, macOS, *BSD etc.)</h2>
318<h3>Prerequisites</h3> 137<h3>Prerequisites</h3>
319<p> 138<p>
320Depending on your distribution, you may need to install a package for 139Depending on your distribution, you may need to install a package for a
321GCC, the development headers and/or a complete SDK. E.g. on a current 140compiler (GCC or Clang/LLVM), the development headers and/or a complete SDK.
322Debian/Ubuntu, install <tt>libc6-dev</tt> with the package manager. 141E.g. on a current Debian/Ubuntu, install <tt>build-essential</tt> with the
142package manager.
323</p> 143</p>
324<p>
325The recommended way to fetch the latest version is to do a pull from
326the git repository.
327</p>
328<p>
329Alternatively, download the latest source package of LuaJIT (pick the .tar.gz).
330Move it to a directory of your choice, open a terminal window and change
331to this directory. Now unpack the archive and change to the newly created
332directory (replace XX.YY.ZZ with the version you downloaded):
333</p>
334<pre class="code">
335tar zxf LuaJIT-XX.YY.ZZ.tar.gz
336cd LuaJIT-XX.YY.ZZ
337</pre> 144</pre>
338<h3>Building LuaJIT</h3> 145<h3>Building LuaJIT</h3>
339<p> 146<p>
@@ -394,15 +201,10 @@ Either install one of the open source SDKs
394GCC plus the required development headers. 201GCC plus the required development headers.
395Or install Microsoft's Visual Studio (MSVC). 202Or install Microsoft's Visual Studio (MSVC).
396</p> 203</p>
397<p>
398Next, pull from the git repository or download the source package and
399unpack it using an archive manager (e.g. the Windows Explorer) to
400a directory of your choice.
401</p>
402<h3>Building with MSVC</h3> 204<h3>Building with MSVC</h3>
403<p> 205<p>
404Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the 206Open a "Visual Studio Command Prompt" (either x86 or x64), <tt>cd</tt> to the
405directory where you've unpacked the sources and run these commands: 207directory with the source code and run these commands:
406</p> 208</p>
407<pre class="code"> 209<pre class="code">
408cd src 210cd src
@@ -415,8 +217,8 @@ Then follow the installation instructions below.
415<h3>Building with MinGW or Cygwin</h3> 217<h3>Building with MinGW or Cygwin</h3>
416<p> 218<p>
417Open a command prompt window and make sure the MinGW or Cygwin programs 219Open a command prompt window and make sure the MinGW or Cygwin programs
418are in your path. Then <tt>cd</tt> to the directory of the git repository 220are in your path. Then <tt>cd</tt> to the directory of the git repository.
419or where you've unpacked the sources. Then run this command for MinGW: 221Then run this command for MinGW:
420</p> 222</p>
421<pre class="code"> 223<pre class="code">
422mingw32-make 224mingw32-make
@@ -518,15 +320,15 @@ make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabi- \
518make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf- 320make HOST_CC="gcc -m32" CROSS=arm-linux-gnueabihf-
519 321
520# ARM64 322# ARM64
521make CROSS=aarch64-linux- 323make CROSS=aarch64-linux-gnu-
522 324
523# PPC 325# PPC
524make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- 326make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
525 327
526# MIPS32 big-endian 328# MIPS32 big-endian
527make HOST_CC="gcc -m32" CROSS=mips-linux- 329make HOST_CC="gcc -m32" CROSS=mips-linux-gnu-
528# MIPS32 little-endian 330# MIPS32 little-endian
529make HOST_CC="gcc -m32" CROSS=mipsel-linux- 331make HOST_CC="gcc -m32" CROSS=mipsel-linux-gnu-
530 332
531# MIPS64 big-endian 333# MIPS64 big-endian
532make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" 334make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"
@@ -605,8 +407,8 @@ make HOST_CC="gcc -m32" CROSS=ppu-lv2-
605To cross-compile for the other consoles from a Windows host, open a 407To cross-compile for the other consoles from a Windows host, open a
606"Native Tools Command Prompt for VS". You need to choose either the 32 408"Native Tools Command Prompt for VS". You need to choose either the 32
607or the 64&nbsp;bit version of the host compiler to match the target. 409or the 64&nbsp;bit version of the host compiler to match the target.
608Then <tt>cd</tt> to the <tt>src</tt> directory below where you've 410Then <tt>cd</tt> to the <tt>src</tt> directory below the source code
609unpacked the sources and run the build command given in the table: 411and run the build command given in the table:
610</p> 412</p>
611<table class="compat"> 413<table class="compat">
612<tr class="compathead"> 414<tr class="compathead">
diff --git a/doc/luajit.html b/doc/luajit.html
index 3bb8aaf2..030cf705 100644
--- a/doc/luajit.html
+++ b/doc/luajit.html
@@ -67,30 +67,6 @@ table.fcompat td {
67 background-image: -o-linear-gradient(#41bfbf 10%, #b0ffff 95%); 67 background-image: -o-linear-gradient(#41bfbf 10%, #b0ffff 95%);
68 background-image: -ms-linear-gradient(#41bfbf 10%, #b0ffff 95%); 68 background-image: -ms-linear-gradient(#41bfbf 10%, #b0ffff 95%);
69} 69}
70table.stats td {
71 color: #ffffff;
72 background: #a0a0a0;
73 background-image: linear-gradient(#808080 10%, #d0d0d0 95%);
74 background-image: -moz-linear-gradient(#808080 10%, #d0d0d0 95%);
75 background-image: -webkit-linear-gradient(#808080 10%, #d0d0d0 95%);
76 background-image: -o-linear-gradient(#808080 10%, #d0d0d0 95%);
77 background-image: -ms-linear-gradient(#808080 10%, #d0d0d0 95%);
78}
79table.stats td.speed {
80 color: #ff4020;
81}
82table.stats td.kb {
83 color: #ffff80;
84 background: #808080;
85 background-image: linear-gradient(#606060 10%, #c0c0c0 95%);
86 background-image: -moz-linear-gradient(#606060 10%, #c0c0c0 95%);
87 background-image: -webkit-linear-gradient(#606060 10%, #c0c0c0 95%);
88 background-image: -o-linear-gradient(#606060 10%, #c0c0c0 95%);
89 background-image: -ms-linear-gradient(#606060 10%, #c0c0c0 95%);
90}
91table.feature small {
92 font-size: 50%;
93}
94</style> 70</style>
95</head> 71</head>
96<body> 72<body>
@@ -131,9 +107,9 @@ table.feature small {
131<a href="ext_profiler.html">Profiler</a> 107<a href="ext_profiler.html">Profiler</a>
132</li></ul> 108</li></ul>
133</li><li> 109</li><li>
134<a href="status.html">Status</a> 110<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
135</li><li> 111</li><li>
136<a href="faq.html">FAQ</a> 112<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
137</li><li> 113</li><li>
138<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 114<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
139</li></ul> 115</li></ul>
@@ -173,23 +149,20 @@ LuaJIT is Copyright &copy; 2005-2023 Mike Pall, released under the
173</table> 149</table>
174 150
175<h2>Overview</h2> 151<h2>Overview</h2>
176<table class="feature stats">
177<tr>
178<td class="speed">3x<br>-&nbsp;&nbsp;100x</td>
179<td class="kb">115&nbsp;<small>KB</small><br>VM</td>
180<td class="kb">90&nbsp;<small>KB</small><br>JIT</td>
181<td class="kloc">63&nbsp;<small>KLOC</small><br>C</td>
182<td class="kloc">24&nbsp;<small>KLOC</small><br>ASM</td>
183<td class="kloc">11&nbsp;<small>KLOC</small><br>Lua</td>
184</tr>
185</table>
186<p style="margin-top: 1em;"> 152<p style="margin-top: 1em;">
187LuaJIT has been successfully used as a <b>scripting middleware</b> in 153LuaJIT has been successfully used as a <b>scripting middleware</b> in
188games, appliances, network and graphics apps, numerical simulations, 154games, appliances, network and graphics apps, numerical simulations,
189trading platforms and many other specialty applications. It scales from 155trading platforms and many other specialty applications.
190embedded devices, smartphones, desktops up to server farms. It combines 156</p>
191high flexibility with high performance 157<p>
192and an unmatched <b>low memory footprint</b>. 158LuaJIT is part of a hundred million web sites, huge SaaS installations,
159network switches, set-top boxes and other embedded devices. You've probably
160already used LuaJIT without knowing about it.
161</p>
162<p>
163LuaJIT scales from embedded devices, smartphones, desktops up to server
164farms. It combines high flexibility with high performance and an unmatched
165<b>low memory footprint</b>.
193</p> 166</p>
194<p> 167<p>
195LuaJIT has been in continuous development since 2005. It's widely 168LuaJIT has been in continuous development since 2005. It's widely
diff --git a/doc/running.html b/doc/running.html
index 325cb6bb..3afc1b56 100644
--- a/doc/running.html
+++ b/doc/running.html
@@ -68,14 +68,15 @@ td.param_default {
68<a href="ext_profiler.html">Profiler</a> 68<a href="ext_profiler.html">Profiler</a>
69</li></ul> 69</li></ul>
70</li><li> 70</li><li>
71<a href="status.html">Status</a> 71<a href="https://luajit.org/status.html">Status <span class="ext">&raquo;</span></a>
72</li><li> 72</li><li>
73<a href="faq.html">FAQ</a> 73<a href="https://luajit.org/faq.html">FAQ <span class="ext">&raquo;</span></a>
74</li><li> 74</li><li>
75<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a> 75<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
76</li></ul> 76</li></ul>
77</div> 77</div>
78<div id="main"> 78<div id="main">
79
79<p> 80<p>
80LuaJIT has only a single stand-alone executable, called <tt>luajit</tt> on 81LuaJIT has only a single stand-alone executable, called <tt>luajit</tt> on
81POSIX systems or <tt>luajit.exe</tt> on Windows. It can be used to run simple 82POSIX systems or <tt>luajit.exe</tt> on Windows. It can be used to run simple
diff --git a/doc/status.html b/doc/status.html
deleted file mode 100644
index 49ced3f9..00000000
--- a/doc/status.html
+++ /dev/null
@@ -1,105 +0,0 @@
1<!DOCTYPE html>
2<html>
3<head>
4<title>Status</title>
5<meta charset="utf-8">
6<meta name="Copyright" content="Copyright (C) 2005-2023">
7<meta name="Language" content="en">
8<link rel="stylesheet" type="text/css" href="bluequad.css" media="screen">
9<link rel="stylesheet" type="text/css" href="bluequad-print.css" media="print">
10<style type="text/css">
11ul li { padding-bottom: 0.3em; }
12</style>
13</head>
14<body>
15<div id="site">
16<a href="https://luajit.org"><span>Lua<span id="logo">JIT</span></span></a>
17</div>
18<div id="head">
19<h1>Status</h1>
20</div>
21<div id="nav">
22<ul><li>
23<a href="luajit.html">LuaJIT</a>
24<ul><li>
25<a href="https://luajit.org/download.html">Download <span class="ext">&raquo;</span></a>
26</li><li>
27<a href="install.html">Installation</a>
28</li><li>
29<a href="running.html">Running</a>
30</li></ul>
31</li><li>
32<a href="extensions.html">Extensions</a>
33<ul><li>
34<a href="ext_ffi.html">FFI Library</a>
35<ul><li>
36<a href="ext_ffi_tutorial.html">FFI Tutorial</a>
37</li><li>
38<a href="ext_ffi_api.html">ffi.* API</a>
39</li><li>
40<a href="ext_ffi_semantics.html">FFI Semantics</a>
41</li></ul>
42</li><li>
43<a href="ext_buffer.html">String Buffers</a>
44</li><li>
45<a href="ext_jit.html">jit.* Library</a>
46</li><li>
47<a href="ext_c_api.html">Lua/C API</a>
48</li><li>
49<a href="ext_profiler.html">Profiler</a>
50</li></ul>
51</li><li>
52<a class="current" href="status.html">Status</a>
53</li><li>
54<a href="faq.html">FAQ</a>
55</li><li>
56<a href="https://luajit.org/list.html">Mailing List <span class="ext">&raquo;</span></a>
57</li></ul>
58</div>
59<div id="main">
60<p>
61This documentation is for LuaJIT 2.1.0-beta3. Please check the <tt>doc</tt>
62directory in each git branch for the version-specific documentation.
63</p>
64<p>
65The currently developed branches are LuaJIT&nbsp;2.1 and LuaJIT&nbsp;2.0.
66</p>
67<p>
68LuaJIT&nbsp;2.0 is in feature-freeze &mdash; new features will only
69be added to LuaJIT&nbsp;2.1.
70</p>
71
72<h2>Current Status</h2>
73<p>
74LuaJIT ought to run all Lua&nbsp;5.1-compatible source code just fine.
75It's considered a serious bug if the VM crashes or produces unexpected
76results &mdash; please report this.
77</p>
78<p>
79Known incompatibilities and issues in LuaJIT&nbsp;2.0:
80</p>
81<ul>
82<li>
83There are some differences in <b>implementation-defined</b> behavior.
84These either have a good reason, are arbitrary design choices,
85or are due to quirks in the VM. The latter cases may get fixed if a
86demonstrable need is shown.
87</li>
88<li>
89The Lua <b>debug API</b> is missing a couple of features (return
90hooks for non-Lua functions) and shows slightly different behavior
91in LuaJIT (no per-coroutine hooks, no tail call counting).
92</li>
93</ul>
94<br class="flush">
95</div>
96<div id="foot">
97<hr class="hide">
98Copyright &copy; 2005-2023
99<span class="noprint">
100&middot;
101<a href="contact.html">Contact</a>
102</span>
103</div>
104</body>
105</html>