seen buildCompile a Seen source file to a native binary.
seen build <source.seen> [-o output] [flags]
| Option | Description |
|---|---|
-o, --output <file> |
Output file path |
-t, --target <target> |
Compilation target (see Targets) |
--backend <backend> |
llvm (default) or c |
-l, --language <lang> |
Source language: en, ar, es, ru, zh, ja |
seen runCompile and execute immediately via JIT:
seen run <source.seen> [--language <lang>]
Uses lli --jit-kind=orc by default. Pass --aot for ahead-of-time compilation.
seen checkType-check without generating code:
seen check <source.seen> [--language <lang>]
seen fmt / seen formatFormat source code (4-space indent, trim trailing whitespace):
seen fmt <source.seen>
seen initCreate a new project scaffold:
seen init <project-name>
Creates project-name/Seen.toml and project-name/src/main.seen.
seen testRun the project's test suite:
seen test
seen cleanRemove build artifacts (.seen_cache/, /tmp/seen_module_*, /tmp/seen_jit_*):
seen clean
seen lspStart the built-in language server:
seen lsp
seen import-cGenerate Seen bindings from a C header file:
seen import-c <header.h>
seen pkgseen pkg fetch
seen pkg pack
seen pkg publish ./registry-root
seen pkg fetch installs registry packages declared in Seen.tomlseen pkg pack creates a source archive for the current packageseen pkg publish writes a static-registry index entry and archive into a local registry directoryindex/<package>.toml and archives/<package>/<package>-<version>.seenpkg.tgzseen --versionseen --version
# Seen 0.6.0 (100% self-hosted)
| Flag | Description |
|---|---|
-O0 |
No optimization |
-O1 |
Light optimization |
-O2 |
Medium optimization (default) |
-O3 |
Aggressive optimization |
--release |
Alias for -O3 with full LTO |
--fast |
Skip Polly, use minimal default<O1> passes (fast compilation) |
-g, --debug |
Include debug information |
| Flag | Description |
|---|---|
--backend llvm |
LLVM backend (default, best performance) |
--backend c |
C99 fallback backend |
--target-cpu=<cpu> |
Target CPU: native, x86-64-v3, x86-64-v4 |
--target=<platform> |
Cross-compile target (see below) |
| Target | Description |
|---|---|
native |
Host platform (default) |
wasm |
WebAssembly module |
c |
C source code output |
llvm-ir |
LLVM IR output |
ios-arm64 |
iOS ARM64 |
ios-sim-arm64 |
iOS Simulator ARM64 |
macos-x86_64 |
macOS x86_64 |
macos-arm64 |
macOS ARM64 |
windows-x86_64 |
Windows x86_64 |
linux-arm64 |
Linux ARM64 |
riscv64 |
RISC-V 64-bit |
| Flag | Description |
|---|---|
--simd=auto |
Auto-detect (default) |
--simd=none |
Disable SIMD |
--simd=sse4.2 |
Force SSE 4.2 |
--simd=avx2 |
Force AVX2 |
--simd=avx512 |
Force AVX-512 |
--simd-report |
Show vectorization report |
--simd-report=full |
Detailed per-loop report |
| Flag | Description |
|---|---|
--null-safety |
Enable null pointer safety checks |
--warn-uninit |
Warn on uninitialized variable access |
--stack-check |
Enable stack overflow checks |
--bounds-check |
Enable array bounds checking |
--panic-on-overflow |
Panic on integer overflow |
--warn-unused-result |
Warn on unused function results |
seen build source.seen --sanitize=address # AddressSanitizer
seen build source.seen --sanitize=undefined # UBSan
seen build source.seen --sanitize=thread # ThreadSanitizer
seen build source.seen --sanitize=memory # MemorySanitizer
| Flag | Description |
|---|---|
--emit-llvm |
Save LLVM IR alongside output |
--emit-glsl |
Emit GLSL shader code (GPU) |
--emit-compile-db |
Generate compile_commands.json |
--trace-llvm |
Trace LLVM IR generation |
--dump-struct-layouts |
Print struct field layouts |
--runtime-debug |
Enable runtime debug output |
# Step 1: Generate profiling instrumentation
seen build app.seen -o app --pgo-generate
./app # Run with representative input
# Step 2: Merge profiling data
llvm-profdata merge -o default.profdata default_*.profraw
# Step 3: Recompile with profile data
seen build app.seen -o app --pgo-use=default.profdata
| Flag | Description |
|---|---|
--ml-log=<path> |
Collect ML training data from optimization remarks |
--ml-decision-log=<path> |
Write optimization decision log (JSONL) |
seen build app.seen --profile default # Allow all types
seen build app.seen --profile deterministic # Reject HashMap without @nondeterministic
seen build app.seen --deterministic # Scalar SIMD, no HashMap
seen build app.seen --feature=my_feature --feature=experimental
Use with @cfg in source:
@cfg("my_feature")
fun experimentalFunction() { ... }
| Flag | Description |
|---|---|
--no-cache |
Disable incremental compilation caching |
--no-fork |
Disable fork-parallel IR generation |
Cache locations:
.seen_cache/ -- source-level incremental cache/tmp/seen_ir_cache -- IR content-addressed cache/tmp/seen_thinlto_cache -- ThinLTO linker cacheseen bundleCreate a macOS app bundle:
seen bundle <executable> <AppName> [--icon=<icon.icns>] [--version=<1.0>]
seen signCode sign a binary or app bundle:
seen sign <path> [--identity=<identity>]
seen notarizeSubmit for Apple notarization:
seen notarize <path.zip|path.app> --apple-id=<email> --team-id=<id> --password=<pwd>
seen lipoCreate universal binary:
seen lipo <x86_64_binary> <arm64_binary> [--output=<universal>]
seen lipo --from-source <source.seen> [--output=<universal>]
seen ipaCreate iOS IPA package:
seen ipa <executable> <AppName> [--bundle-id=...] [--version=...] [--provisioning-profile=...]
| Variable | Values | Description |
|---|---|---|
SEEN_DEBUG_TYPES |
1 |
Type checker debug output |
SEEN_TRACE_LLVM |
all, inst, values, types, ir, layouts, gep, boxing |
LLVM backend tracing |
SEEN_TRACE_LEXER |
1 |
Lexer operation tracing |
SEEN_TRACE_PARSER |
1 |
Parser operation tracing |
SEEN_TRACE_CODEGEN |
1 |
Code generation tracing |
SEEN_TRACE_ALL |
1 |
Enable all tracing |
SEEN_TRACE_VERBOSE |
1 |
Extra verbose trace output |
SEEN_LLVM_BIN |
path to LLVM bin dir |
Override LLVM tool lookup for opt, llc, and llvm-link when they are not on PATH |
# Debug type checking
SEEN_DEBUG_TYPES=1 seen build program.seen
# Debug all LLVM IR generation
SEEN_TRACE_LLVM=all seen build program.seen
# Debug struct field access (GEP operations)
SEEN_TRACE_LLVM=gep seen build program.seen
# Debug boxing/unboxing for generics
SEEN_TRACE_LLVM=boxing seen build program.seen
