You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we generate documentation at runtime due to the way `tealr` works but this might change in the future as ideally this would be done statically.
289
289
290
-
It is probably a wise idea to setup a separate executable whose purpose is to only generate documentation, and run it every time before a release. But keeping this step in your main app will make sure your script environment is always setup correctly.
290
+
It is probably a wise idea to set up a separate executable whose only purpose is to generate documentation, and run it every time before a release. But keeping this step in your main app will make sure your script environment is always set up correctly.
291
291
292
292
#### Lua
293
293
294
-
Lua documentation is provided by `tealr`, a wrapper around the `mlua` lua api which decorates their standard types. On top of providing documentation generation it's also capable of generating `d.tl` files which can be used to introduce static typing to lua via the `teal` project (you do not need to use teal to generate documentation).
294
+
Lua documentation is provided by `tealr`, a wrapper around the `mlua` lua API which decorates their standard types. On top of providing documentation generation, it's also capable of generating `d.tl` files which can be used to introduce static typing to lua via the `teal` project (you do not need to use teal to generate documentation).
295
295
296
-
This can all be seen at work in the [this example](bevy_mod_scripting/examples/lua/documentation_gen.rs).
296
+
This can all be seen at work in [this example](bevy_mod_scripting/examples/lua/documentation_gen.rs).
297
297
298
298
##### Teal - Lua static typing
299
299
300
-
Teal is the reccomended way of introducing lua to your bevy game. This functionality is locked behind the `teal` cargo feature however, since it's quite opinionanted when it comes to your asset structure (`script` and `scripts/build`, folders under `assets`), and also requires `lua` + `teal` + `tealr_doc_gen` (`cargo install --git https://github.com/lenscas/tealr_doc_gen --rev 91afd4a528e7f5b746ac3a6b299c422b42c05db6`) to be installed (see https://github.com/teal-language/tl and `tealr`).
300
+
Teal is the recommended way of introducing lua to your bevy game. This functionality is locked behind the `teal` cargo feature however, since it's quite opinionanted when it comes to your asset structure (`script` and `scripts/build`, folders under `assets`), and also requires `lua` + `teal` + `tealr_doc_gen` (`cargo install --git https://github.com/lenscas/tealr_doc_gen --rev 91afd4a528e7f5b746ac3a6b299c422b42c05db6`) to be installed (see https://github.com/teal-language/tl and `tealr`).
301
301
302
302
Once enabled, `.tl` files can be loaded as lua scripts in addition to `.lua` files and compiled on the fly. With full hot-reloading support. When you're ready to release your game, you just need to run `tl build` from the `assets/scripts` directory to compile your teal files. This will generate `.lua` files under `assets/scripts/build`. You can manage loading scripts using the [`bevy_mod_scripting::lua_path`] macro.
303
303
@@ -308,7 +308,7 @@ If `teal` is enabled and you've added the `update_documentation` step to your ap
308
308
- any scripts with a `.tl` extension will be compiled to lua code and type checked
309
309
On optimized release builds none of this happens (no debug_asserts).
310
310
311
-
The reccomended workflow is to use vscode and the official teal extension with an additional `tlconfig.lua` file at the **root** of your workspace with the
311
+
The recommended workflow is to use vscode and the official teal extension with an additional `tlconfig.lua` file at the **root** of your workspace with the
312
312
following content:
313
313
```lua
314
314
return {
@@ -320,7 +320,7 @@ return {
320
320
321
321
#### Rhai
322
322
323
-
Rhai currently does not have any utilities existing for generating documentation (for the rust provided API), once something comes out we'll include it.
323
+
Rhai currently does not have any existing utilities for generating documentation (for the rust provided API), once something comes out we'll include it.
0 commit comments