The insty compiler
Command-line reference for the insty compiler — output modes, targets, and OS-dev flags.
The insty binary compiles .ins source to native executables (or objects, ASTs, and tokens).
Basic usage
insty src/main.ins -o app # compile + link an executable
insty -c src/main.ins # emit an object file
insty --check src/main.ins # type-check only, no output
insty --emit-ast src/main.ins # print the AST
insty --emit-tokens src/main.ins # print the token stream Targets
insty --target x86_64_linux src/main.ins -o app
insty --target x86_64_windows src/main.ins -o app.exe
insty --target x86_64_instantos src/main.ins -o app
insty --target targets/x86_64-unknown-none.toml --freestanding src/main.ins -o kernel.elf Built-in targets include x86_64_linux, x86_64_windows, x86_64_instantos, and x86_64_efi.
Custom targets are described by a TOML file — see the OS development guide.
Useful flags
| Flag | Purpose |
|---|---|
--target <name-or-file> | Built-in target or custom target TOML |
--freestanding, --no-std | Disable hosted assumptions |
--allocator none\|runtime\|external | Select the heap strategy (default none) |
--entry <symbol> | Linker entry symbol |
--linker <path> / --linker-script <file> | Override the linker / use a script |
--sysroot <dir> | Use a target sysroot |
--output-format executable\|elf\|raw-binary\|pe\|uefi | Link output format |
--raw-binary | Emit a flat binary for ELF targets |
--multiboot2 | Add a Multiboot2 header for x86 kernels |
--panic abort\|handler | Panic strategy |
--bounds-check | Emit runtime range checks on slice/array indexing |
Allocator modes
The allocator defaults to none: any heap-backed feature (new, delete, array literals that need
heap storage, string-interpolation buffers, @malloc / @free / @realloc) is a compile-time error
until you pass --allocator runtime or --allocator external.
See also: the cloud CLI.