Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

Output passes ​

Run in this order on the rendered files. Each can be turned off in optimize.

PassDoes
inlineFolds one-command and single-caller private functions into callers
groupMoves lines sharing an execute prefix into one call
dedupeIdentical private functions share one file
inferTypesAdds type= when a tag only ever belongs to one entity type
internReadsScore reads used twice in /compute go in one provider file

Diagrams ​

Output passes (end of buildDatapack)Rendered files + lineInfoinlinefold one-command and single-callerprivate functions into their callersgrouplines sharing an execute prefix-> one execute … run functiondedupeidentical private functions share one fileinferTypesadd type= when a tag only everbelongs to one entity typeinternReadsscore reads used twice in /compute-> one provider fileFinal filesEach one can be turned off:optimize: { inline: false, … }dp.keep(fn) keeps a function as its own file.

Released under the MIT License · Credits
These docs were written with AI; the layout and every page have been reviewed by a human.