Replacing the Standard Library

The standard startup module that defines _main(), PreinitObject, and so on, is called _main.t. By default, the compiler includes this in every build automatically. Most programs will have no reason to modify the default versions provided in _main.t, which is why t3make includes the file in all builds by default. However, if you do need to replace this module, you can use the -nodef compiler option to tell the compiler not to include this default module. If you do this, you'll minimally need to define the _main() and _mainRestore() functions yourself.

Most programs also explicitly include in their project files. This is the full system library, which includes definitions for required support classes for the File and GrammarProd intrinsic classes, as well as the Tokenizer class. You can eliminate this module from your build simply by removing from the list of files in your project. If you do this, you'll have to define your own versions of the support classes for File and GrammarProd, if you use those classes.