SP Compiler CLI (`spc`)
The spc binary is the primary native compiler executable. It coordinates parsing, semantic type analysis, LLVM IR translation, and Clang machine code linking.
bash
1# 1. Run file directly2spc run main.sp34# 2. Compile native executable with -O35spc build main.sp -o my_app -O367# 3. Check syntax and types without linking8spc check main.sp910# 4. Cross-compile for target triple11spc build main.sp -o my_app_linux --target x86_64-unknown-linux-gnu
Subcommands
spc build <file> [-o <out>] [-O0..-O3]Compiles the source file into a native binary (.exe on Windows, ELF on Linux, Mach-O on macOS).
spc run <file> [-- <args...>]Compiles into temporary cache and immediately executes with optional program arguments.
spc check <file>Performs Lexer, Parser, and TypeChecker passes without emitting binary files. Useful for fast CI validation.