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 directly
2spc run main.sp
3
4# 2. Compile native executable with -O3
5spc build main.sp -o my_app -O3
6
7# 3. Check syntax and types without linking
8spc check main.sp
9
10# 4. Cross-compile for target triple
11spc 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.