The vscode-seen/ directory contains a full-featured VS Code extension.
cd vscode-seen
npm install
npm run package
code --install-extension seen-*.vsix
Shift+Alt+F formats the current file| Command | Shortcut | Description |
|---|---|---|
| Seen: Build | Ctrl+Shift+B |
Build project |
| Seen: Run | F5 |
Run project |
| Seen: Format | Shift+Alt+F |
Format document |
| Seen: Check | -- | Type check project |
| Seen: Test | -- | Run tests |
| Seen: Clean | -- | Clean build artifacts |
| Seen: Init | -- | Initialize new project |
| Seen: REPL | -- | Open interactive REPL |
| Seen: Switch Language | -- | Change keyword language |
{
"seen.compiler.path": "seen",
"seen.lsp.enabled": true,
"seen.lsp.trace.server": "off",
"seen.formatting.enable": true,
"seen.target.default": "native",
"seen.language.default": "en"
}
| Prefix | Description |
|---|---|
main |
Main function entry point |
fun |
Function declaration |
class |
Class with constructor |
struct |
Struct declaration |
enum |
Enum declaration |
trait |
Trait declaration |
impl |
Trait implementation |
if / ife |
If / if-else |
for |
For-in loop |
while |
While loop |
when / match |
Pattern matching |
let / var |
Variable declarations |
async |
Async function |
compute |
GPU compute shader |
parallel_for |
Parallel for loop |
simd |
SIMD vector construction |
trycatch |
Try-catch block |
defer / errdefer |
Deferred cleanup |
extern |
External/FFI function |
derive |
Derive macro |
test / bench |
Test/benchmark function |
unsafe |
Unsafe block |
region / arena |
Memory region/arena |
println |
Print with newline |
seen lsp
Features:
require'lspconfig'.seen.setup{
cmd = {"seen", "lsp"},
filetypes = {"seen"},
root_dir = require'lspconfig.util'.root_pattern("Seen.toml", ".git"),
}
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("seen" "lsp"))
:major-modes '(seen-mode)
:server-id 'seen-lsp))
seen fmt <source.seen>
Formatting rules:
[format] in Seen.toml:[format]
line-width = 100
indent = 4
trailing-comma = true
seen test
Write tests with the @test decorator:
@test
fun test_addition() {
assert(1 + 1 == 2, "basic addition")
}
@test
fun test_string_concat() {
let result = "hello" + " " + "world"
assert(result == "hello world", "string concat")
}
Run end-to-end tests across all languages:
bash tests/e2e_multilang/run_all_e2e.sh
# Type checker
SEEN_DEBUG_TYPES=1 seen build program.seen
# LLVM IR generation
SEEN_TRACE_LLVM=all seen build program.seen
# Struct layout
SEEN_TRACE_LLVM=gep seen build program.seen
seen build program.seen --emit-llvm
cat program.ll
seen build program.seen -g -o program
gdb ./program
seen build program.seen --emit-compile-db
# produces compile_commands.json
On pacman-compatible Linux hosts, you can create a local AArch64 cross sysroot for Seen without installing system packages globally:
./scripts/setup_linux_arm64_sysroot.sh
source artifacts/toolchains/linux-arm64/env.sh
The helper downloads and extracts the Arch/CachyOS cross-packages under artifacts/toolchains/linux-arm64/. The generated env.sh sets SEEN_LINUX_ARM64_SYSROOT and SEEN_LINUX_ARM64_GCC_TOOLCHAIN, allowing compiler_seen/target/seen and the native smoke harness to produce Linux ARM64 binaries on x86_64 Linux hosts.
Validate the local setup with either command:
bash scripts/native_target_smoke.sh --compiler compiler_seen/target/seen --target linux-arm64
bash scripts/platform_matrix.sh --stage3 compiler_seen/target/seen --platform linux-arm64
For hosts that can execute the produced binaries directly, platform_matrix.sh --with-runtime also runs lightweight runtime checks in addition to compile smoke. On Apple Silicon macOS, the Apple runtime subset now covers hello_english, test_comptime_target_predicates, hash_map_basic, string_hash_map_basic, str_basic, and string_buffer_basic for macos-arm64, macos-x86_64, and ios-sim-arm64.
The same command also exposes a capability-gated ios-arm64 physical-device lane. Pass --ios-device <udid> to target a specific iPhone, --ios-provisioning-profile <path> to embed a development profile, and optionally --ios-sign-identity, --ios-entitlements, and --ios-bundle-prefix if your local signing setup needs them. When no provisioned device is available, the report shows unavailable instead of reporting a successful lane.
If you want the helper to replace an existing extracted toolchain directory, rerun it with --force.
Generate Seen bindings from a C header:
seen import-c mylib.h
Outputs extern fun declarations that can be pasted into Seen source.
