Skip to content

Commit b3b62e8

Browse files
committed
Fix URL links for book.
1 parent c2f225b commit b3b62e8

139 files changed

Lines changed: 838 additions & 838 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

book/about/features.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,22 @@ <h2><a class="header" href="#easy" id="easy">Easy</a></h2>
174174
<p>Easy-to-use language similar to JavaScript+Rust with dynamic typing.</p>
175175
</li>
176176
<li>
177-
<p>Tight integration with native Rust <a href="/rhai/language/functions.html">functions</a> and <a href="/rhai/rust/custom.html">types</a> including <a href="/rhai/rust/getters-setters.html">getters/setters</a>,
178-
<a href="/rhai/rust/custom.html">methods</a> and <a href="/rhai/rust/indexers.html">indexers</a>.</p>
177+
<p>Tight integration with native Rust <a href="/book/language/functions.html">functions</a> and <a href="/book/rust/custom.html">types</a> including <a href="/book/rust/getters-setters.html">getters/setters</a>,
178+
<a href="/book/rust/custom.html">methods</a> and <a href="/book/rust/indexers.html">indexers</a>.</p>
179179
</li>
180180
<li>
181-
<p>Freely pass Rust variables/constants into a script via an external <a href="/rhai/engine/scope.html"><code>Scope</code></a> – all clonable Rust types are supported seamlessly
181+
<p>Freely pass Rust variables/constants into a script via an external <a href="/book/engine/scope.html"><code>Scope</code></a> – all clonable Rust types are supported seamlessly
182182
without the need to implement any special trait.</p>
183183
</li>
184184
<li>
185-
<p>Easily <a href="/rhai/engine/call-fn.html">call a script-defined function</a> from Rust.</p>
185+
<p>Easily <a href="/book/engine/call-fn.html">call a script-defined function</a> from Rust.</p>
186186
</li>
187187
<li>
188188
<p>Very few additional dependencies – right now only <a href="https://crates.io/crates/smallvec/"><code>smallvec</code></a> plus crates for procedural macros;
189-
for <a href="/rhai/start/features.html"><code>no-std</code></a> and <code>WASM</code> builds, a number of additional dependencies are pulled in to provide for missing functionalities.</p>
189+
for <a href="/book/start/features.html"><code>no-std</code></a> and <code>WASM</code> builds, a number of additional dependencies are pulled in to provide for missing functionalities.</p>
190190
</li>
191191
<li>
192-
<p><a href="/rhai/plugins/index.html">Plugins</a> system powered by procedural macros simplifies custom API development.</p>
192+
<p><a href="/book/plugins/index.html">Plugins</a> system powered by procedural macros simplifies custom API development.</p>
193193
</li>
194194
</ul>
195195
<h2><a class="header" href="#fast" id="fast">Fast</a></h2>
@@ -201,31 +201,31 @@ <h2><a class="header" href="#fast" id="fast">Fast</a></h2>
201201
<p>Fairly efficient evaluation (1 million iterations in 0.3 sec on a single core, 2.3 GHz Linux VM).</p>
202202
</li>
203203
<li>
204-
<p>Scripts are <a href="/rhai/engine/optimize/index.html">optimized</a> (useful for template-based machine-generated scripts) for repeated evaluations.</p>
204+
<p>Scripts are <a href="/book/engine/optimize/index.html">optimized</a> (useful for template-based machine-generated scripts) for repeated evaluations.</p>
205205
</li>
206206
</ul>
207207
<h2><a class="header" href="#dynamic" id="dynamic">Dynamic</a></h2>
208208
<ul>
209209
<li>
210-
<p><a href="/rhai/language/overload.html">Function overloading</a>.</p>
210+
<p><a href="/book/language/overload.html">Function overloading</a>.</p>
211211
</li>
212212
<li>
213-
<p><a href="/rhai/rust/operators.html">Operator overloading</a>.</p>
213+
<p><a href="/book/rust/operators.html">Operator overloading</a>.</p>
214214
</li>
215215
<li>
216-
<p>Organize code base with dynamically-loadable <a href="/rhai/rust/modules/index.html">modules</a>.</p>
216+
<p>Organize code base with dynamically-loadable <a href="/book/rust/modules/index.html">modules</a>.</p>
217217
</li>
218218
<li>
219-
<p>Dynamic dispatch via <a href="/rhai/language/fn-ptr.html">function pointers</a> with additional support for <a href="/rhai/language/fn-curry.html">currying</a>.</p>
219+
<p>Dynamic dispatch via <a href="/book/language/fn-ptr.html">function pointers</a> with additional support for <a href="/book/language/fn-curry.html">currying</a>.</p>
220220
</li>
221221
<li>
222-
<p><a href="/rhai/language/fn-closure.html">Closures</a> that can capture shared variables.</p>
222+
<p><a href="/book/language/fn-closure.html">Closures</a> that can capture shared variables.</p>
223223
</li>
224224
<li>
225-
<p>Some support for <a href="/rhai/patterns/oop.html">object-oriented programming (OOP)</a>.</p>
225+
<p>Some support for <a href="/book/patterns/oop.html">object-oriented programming (OOP)</a>.</p>
226226
</li>
227227
<li>
228-
<p>Hook into variables access via <a href="/rhai/engine/var.html">variable resolver</a>.</p>
228+
<p>Hook into variables access via <a href="/book/engine/var.html">variable resolver</a>.</p>
229229
</li>
230230
</ul>
231231
<h2><a class="header" href="#safe" id="safe">Safe</a></h2>
@@ -234,39 +234,39 @@ <h2><a class="header" href="#safe" id="safe">Safe</a></h2>
234234
<p>Relatively little <code>unsafe</code> code (yes there are some for performance reasons).</p>
235235
</li>
236236
<li>
237-
<p>Sand-boxed – the scripting <a href="/rhai/engine/hello-world.html"><code>Engine</code></a>, if declared immutable, cannot mutate the containing environment unless
238-
<a href="/rhai/patterns/control.html">explicitly permitted</a>.</p>
237+
<p>Sand-boxed – the scripting <a href="/book/engine/hello-world.html"><code>Engine</code></a>, if declared immutable, cannot mutate the containing environment unless
238+
<a href="/book/patterns/control.html">explicitly permitted</a>.</p>
239239
</li>
240240
</ul>
241241
<h2><a class="header" href="#rugged" id="rugged">Rugged</a></h2>
242242
<ul>
243243
<li>
244-
<p>Protected against malicious attacks (such as <a href="/rhai/safety/max-call-stack.html">stack-overflow</a>, <a href="/rhai/safety/max-string-size.html">over-sized data</a>,
245-
and <a href="/rhai/safety/max-operations.html">runaway scripts</a> etc.) that may come from untrusted third-party user-land scripts.</p>
244+
<p>Protected against malicious attacks (such as <a href="/book/safety/max-call-stack.html">stack-overflow</a>, <a href="/book/safety/max-string-size.html">over-sized data</a>,
245+
and <a href="/book/safety/max-operations.html">runaway scripts</a> etc.) that may come from untrusted third-party user-land scripts.</p>
246246
</li>
247247
<li>
248-
<p>Track script evaluation <a href="/rhai/safety/progress.html">progress</a> and manually terminate a script run.</p>
248+
<p>Track script evaluation <a href="/book/safety/progress.html">progress</a> and manually terminate a script run.</p>
249249
</li>
250250
</ul>
251251
<h2><a class="header" href="#flexible" id="flexible">Flexible</a></h2>
252252
<ul>
253253
<li>
254-
<p>Re-entrant scripting <a href="/rhai/engine/hello-world.html"><code>Engine</code></a> can be made <code>Send + Sync</code> (via the <a href="/rhai/start/features.html"><code>sync</code></a> feature).</p>
254+
<p>Re-entrant scripting <a href="/book/engine/hello-world.html"><code>Engine</code></a> can be made <code>Send + Sync</code> (via the <a href="/book/start/features.html"><code>sync</code></a> feature).</p>
255255
</li>
256256
<li>
257257
<p>Serialization/deserialization support via <a href="https://crates.io/crates/serde"><code>serde</code></a>.</p>
258258
</li>
259259
<li>
260-
<p>Support for <a href="/rhai/start/builds/minimal.html">minimal builds</a> by excluding unneeded language <a href="/rhai/start/features.html">features</a>.</p>
260+
<p>Support for <a href="/book/start/builds/minimal.html">minimal builds</a> by excluding unneeded language <a href="/book/start/features.html">features</a>.</p>
261261
</li>
262262
<li>
263-
<p>Supports <a href="targets.html">most build targets</a> including <code>no-std</code> and <a href="/rhai/start/builds/wasm.html">WASM</a>.</p>
263+
<p>Supports <a href="targets.html">most build targets</a> including <code>no-std</code> and <a href="/book/start/builds/wasm.html">WASM</a>.</p>
264264
</li>
265265
<li>
266-
<p>Surgically <a href="/rhai/engine/disable.html">disable keywords and operators</a> to restrict the language.</p>
266+
<p>Surgically <a href="/book/engine/disable.html">disable keywords and operators</a> to restrict the language.</p>
267267
</li>
268268
<li>
269-
<p>Use as a <a href="/rhai/engine/dsl.html">DSL</a> by defining <a href="/rhai/engine/custom-op.html">custom operators</a> and/or extending the language with <a href="/rhai/engine/custom-syntax.html">custom syntax</a>.</p>
269+
<p>Use as a <a href="/book/engine/dsl.html">DSL</a> by defining <a href="/book/engine/custom-op.html">custom operators</a> and/or extending the language with <a href="/book/engine/custom-syntax.html">custom syntax</a>.</p>
270270
</li>
271271
</ul>
272272

book/about/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ <h1 class="menu-title">Rhai - Embedded Scripting for Rust</h1>
168168
<div id="content" class="content">
169169
<main>
170170
<h1><a class="header" href="#what-is-rhai" id="what-is-rhai">What is Rhai</a></h1>
171-
<p><img src="/rhai/images/logo/rhai-banner-transparent-colour.svg" alt="Rhai Logo" /></p>
171+
<p><img src="/book/images/logo/rhai-banner-transparent-colour.svg" alt="Rhai Logo" /></p>
172172
<p>Rhai is an embedded scripting language and evaluation engine for Rust that gives a safe and easy way
173173
to add scripting to any application.</p>
174174
<h2><a class="header" href="#versions" id="versions">Versions</a></h2>
175175
<p>This Book is for version <strong>0.19.9</strong> of Rhai.</p>
176-
<p>For the latest development version, see <a href="/rhai/vnext/">here</a>.</p>
176+
<p>For the latest development version, see <a href="/book/vnext/">here</a>.</p>
177177
<h2><a class="header" href="#etymology-of-the-name-rhai" id="etymology-of-the-name-rhai">Etymology of the name “Rhai”</a></h2>
178178
<h3><a class="header" href="#as-per-rhais-author-johnathan-turner" id="as-per-rhais-author-johnathan-turner">As per Rhai’s author Johnathan Turner</a></h3>
179179
<p>In the beginning there was <a href="http://chaiscript.com">ChaiScript</a>,

book/about/non-design.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,27 +179,27 @@ <h1><a class="header" href="#what-rhai-isnt" id="what-rhai-isnt">What Rhai Isn
179179
</li>
180180
<li>
181181
<p><strong>No structures/records/tuples</strong> – define your types in Rust instead; Rhai can seamlessly work with <em>any Rust type</em>.</p>
182-
<p>There is, however, a built-in <a href="/rhai/language/object-maps.html">object map</a> type which is adequate for most uses.
183-
It is possible to simulate <a href="/rhai/patterns/oop.html">object-oriented programming (OOP)</a> by storing <a href="/rhai/language/fn-ptr.html">function pointers</a>
184-
or <a href="/rhai/language/fn-closure.html">closures</a> in <a href="/rhai/language/object-maps.html">object map</a> properties, turning them into <em>methods</em>.</p>
182+
<p>There is, however, a built-in <a href="/book/language/object-maps.html">object map</a> type which is adequate for most uses.
183+
It is possible to simulate <a href="/book/patterns/oop.html">object-oriented programming (OOP)</a> by storing <a href="/book/language/fn-ptr.html">function pointers</a>
184+
or <a href="/book/language/fn-closure.html">closures</a> in <a href="/book/language/object-maps.html">object map</a> properties, turning them into <em>methods</em>.</p>
185185
</li>
186186
<li>
187187
<p><strong>No first-class functions</strong> – Code your functions in Rust instead, and register them with Rhai.</p>
188-
<p>There is, however, support for simple <a href="/rhai/language/fn-ptr.html">function pointers</a> to allow runtime dispatch by function name.</p>
188+
<p>There is, however, support for simple <a href="/book/language/fn-ptr.html">function pointers</a> to allow runtime dispatch by function name.</p>
189189
</li>
190190
<li>
191191
<p><strong>No garbage collection</strong> – this should be expected, so...</p>
192192
</li>
193193
<li>
194-
<p><strong>No first-class closures</strong> – do your closure magic in Rust instead: <a href="/rhai/engine/call-fn.html">turn a Rhai scripted function into a Rust closure</a>.</p>
195-
<p>There is, however, support for simulated <a href="/rhai/language/fn-closure.html">closures</a> via <a href="/rhai/language/fn-curry.html">currying</a> a <a href="/rhai/language/fn-ptr.html">function pointer</a> with
194+
<p><strong>No first-class closures</strong> – do your closure magic in Rust instead: <a href="/book/engine/call-fn.html">turn a Rhai scripted function into a Rust closure</a>.</p>
195+
<p>There is, however, support for simulated <a href="/book/language/fn-closure.html">closures</a> via <a href="/book/language/fn-curry.html">currying</a> a <a href="/book/language/fn-ptr.html">function pointer</a> with
196196
captured shared variables.</p>
197197
</li>
198198
<li>
199199
<p><strong>No byte-codes/JIT</strong> – Rhai has an optimized AST-walking interpreter which is fast enough for most casual
200200
usage scenarios. Essential AST data structures are packed and kept together to maximize cache friendliness.</p>
201201
<p>Functions are dispatched based on pre-calculated hashes and accessing variables are mostly through pre-calculated
202-
offsets to the variables file (a <a href="/rhai/engine/scope.html"><code>Scope</code></a>), so it is seldom necessary to look something up by text name.</p>
202+
offsets to the variables file (a <a href="/book/engine/scope.html"><code>Scope</code></a>), so it is seldom necessary to look something up by text name.</p>
203203
<p>In addition, Rhai’s design deliberately avoids maintaining a <em>scope chain</em> so function scopes do not
204204
pay any speed penalty. This particular design also allows variables data to be kept together in a contiguous
205205
block, avoiding allocations and fragmentation while being cache-friendly. In a typical script evaluation run,
@@ -211,8 +211,8 @@ <h1><a class="header" href="#what-rhai-isnt" id="what-rhai-isnt">What Rhai Isn
211211
<p><strong>No formal language grammar</strong> – Rhai uses a hand-coded lexer, a hand-coded top-down recursive-descent parser
212212
for statements, and a hand-coded Pratt parser for expressions.</p>
213213
<p>This lack of formalism allows the <em>tokenizer</em> and <em>parser</em> themselves to be exposed as services in order
214-
to support <a href="/rhai/engine/disable.html">disabling keywords/operators</a>, adding <a href="/rhai/engine/custom-op.html">custom operators</a>,
215-
and defining <a href="/rhai/engine/custom-syntax.html">custom syntax</a>.</p>
214+
to support <a href="/book/engine/disable.html">disabling keywords/operators</a>, adding <a href="/book/engine/custom-op.html">custom operators</a>,
215+
and defining <a href="/book/engine/custom-syntax.html">custom syntax</a>.</p>
216216
</li>
217217
</ul>
218218
<h2><a class="header" href="#do-not-write-the-next-4d-vr-game-in-rhai" id="do-not-write-the-next-4d-vr-game-in-rhai">Do Not Write The Next 4D VR Game in Rhai</a></h2>

book/about/targets.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ <h1><a class="header" href="#supported-targets-and-builds" id="supported-targets
174174
<p>All common CPU targets for Windows, Linux and MacOS.</p>
175175
</li>
176176
<li>
177-
<p>WebAssembly (<a href="/rhai/start/builds/wasm.html">WASM</a>)</p>
177+
<p>WebAssembly (<a href="/book/start/builds/wasm.html">WASM</a>)</p>
178178
</li>
179179
<li>
180-
<p><a href="/rhai/start/features.html"><code>no-std</code></a></p>
180+
<p><a href="/book/start/features.html"><code>no-std</code></a></p>
181181
</li>
182182
</ul>
183183
<h2><a class="header" href="#minimum-rust-version" id="minimum-rust-version">Minimum Rust Version</a></h2>

book/advanced.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ <h1 class="menu-title">Rhai - Embedded Scripting for Rust</h1>
168168
<div id="content" class="content">
169169
<main>
170170
<h1><a class="header" href="#advanced-topics" id="advanced-topics">Advanced Topics</a></h1>
171-
<p>This section covers advanced features of the Rhai <a href="/rhai/engine/hello-world.html"><code>Engine</code></a>.</p>
171+
<p>This section covers advanced features of the Rhai <a href="/book/engine/hello-world.html"><code>Engine</code></a>.</p>
172172

173173
</main>
174174

book/appendix/keywords.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ <h1><a class="header" href="#keywords-list" id="keywords-list">Keywords List</a>
188188
<tr><td align="center"><code>throw</code></td><td>throw exception</td><td align="center"></td><td align="center">no</td><td align="center"></td></tr>
189189
<tr><td align="center"><code>try</code></td><td>trap exception</td><td align="center"></td><td align="center">no</td><td align="center"></td></tr>
190190
<tr><td align="center"><code>catch</code></td><td>catch exception</td><td align="center"></td><td align="center">no</td><td align="center"></td></tr>
191-
<tr><td align="center"><code>import</code></td><td>import module</td><td align="center"><a href="/rhai/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
192-
<tr><td align="center"><code>export</code></td><td>export variable</td><td align="center"><a href="/rhai/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
193-
<tr><td align="center"><code>as</code></td><td>alias for variable export</td><td align="center"><a href="/rhai/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
194-
<tr><td align="center"><code>private</code></td><td>mark function private</td><td align="center"><a href="/rhai/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
195-
<tr><td align="center"><code>fn</code> (lower-case <code>f</code>)</td><td>function definition</td><td align="center"><a href="/rhai/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
196-
<tr><td align="center"><code>Fn</code> (capital <code>F</code>)</td><td>create a <a href="/rhai/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">yes</td></tr>
197-
<tr><td align="center"><code>call</code></td><td>call a <a href="/rhai/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">no</td></tr>
198-
<tr><td align="center"><code>curry</code></td><td>curry a <a href="/rhai/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">no</td></tr>
199-
<tr><td align="center"><code>this</code></td><td>reference to base object for method call</td><td align="center"><a href="/rhai/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
191+
<tr><td align="center"><code>import</code></td><td>import module</td><td align="center"><a href="/book/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
192+
<tr><td align="center"><code>export</code></td><td>export variable</td><td align="center"><a href="/book/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
193+
<tr><td align="center"><code>as</code></td><td>alias for variable export</td><td align="center"><a href="/book/start/features.html"><code>no_module</code></a></td><td align="center">no</td><td align="center"></td></tr>
194+
<tr><td align="center"><code>private</code></td><td>mark function private</td><td align="center"><a href="/book/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
195+
<tr><td align="center"><code>fn</code> (lower-case <code>f</code>)</td><td>function definition</td><td align="center"><a href="/book/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
196+
<tr><td align="center"><code>Fn</code> (capital <code>F</code>)</td><td>create a <a href="/book/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">yes</td></tr>
197+
<tr><td align="center"><code>call</code></td><td>call a <a href="/book/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">no</td></tr>
198+
<tr><td align="center"><code>curry</code></td><td>curry a <a href="/book/language/fn-ptr.html">function pointer</a></td><td align="center"></td><td align="center">yes</td><td align="center">no</td></tr>
199+
<tr><td align="center"><code>this</code></td><td>reference to base object for method call</td><td align="center"><a href="/book/start/features.html"><code>no_function</code></a></td><td align="center">no</td><td align="center"></td></tr>
200200
<tr><td align="center"><code>type_of</code></td><td>get type name of value</td><td align="center"></td><td align="center">yes</td><td align="center">yes</td></tr>
201201
<tr><td align="center"><code>print</code></td><td>print value</td><td align="center"></td><td align="center">yes</td><td align="center">yes</td></tr>
202202
<tr><td align="center"><code>debug</code></td><td>print value in debug format</td><td align="center"></td><td align="center">yes</td><td align="center">yes</td></tr>

0 commit comments

Comments
 (0)