Expand description
htl: Teal, hidden.
Embeds the Teal compiler (tl.lua) into an mlua state so .tl sources can be
type-checked, generated and executed without any external toolchain.
Htl::check/ [Htl::gen]: type-check and generate Lua from a.tlfileHtl::install_searcher: strictrequirefor.tl(type errors abort the require)Htl::preload: register generated Lua (e.g. frominclude_tl!) under a module namebundle: stripped-bytecode bundles produced byhtl build
Re-exports§
pub use mlua;
Modules§
- bundle
- Stripped-bytecode bundle format (
.hb). - pkg
- mlua-pkg integration: a
TealResolverthat serves.tlmodules through mlua-pkg’sRegistry, so Teal sources sit in the same resolution chain as Rust-native modules, embedded Lua, vendored git deps and assets. - teal
- Rust <-> Teal type bridge used by
#[derive(TealRecord)]and#[host_module]. - testing
htl test: discovery, one isolated Lua state per test file, compile, report.
Structs§
Constants§
- TEAL_
VERSION - Teal version vendored into this crate.
Functions§
- collect_
tl - Collect
.tlsources from files and directories (sorted, recursive). - is_
tl_ source trueforfoo.tlbut notfoo.d.tl.- module_
name root/foo/bar.tl->foo.bar,root/foo/init.tl->foo.- parent_
dir - Parent directory of a file,
.when the path has none. - write_
if_ changed - Write
texttopathonly if the content differs. Returnstruewhen written. Used by the derive macros to emit.d.tlfiles without churning cargo’s fingerprints.