compile_inline_teal!() { /* proc-macro */ }
Expand description

Compiles the given teal code at compile time to lua.

The macro tries it best to pass the correct --include-dir to tl using CARGO_MANIFEST_DIR. However, this isn’t always where you want it to be. In that case you can add an extra argument that will be joined with CARGO_MANIFEST_DIR using std::path::PathBuf::join

Compile time requirement!

At this point in time this requires you to have the teal compiler installed and accessible in the path as tl.

Example

assert_eq!(compile_inline_teal!("local a : number = 1"),"local a = 1\n")