The vscode-seen/ directory contains the official VS Code extension. It tracks the shipped six-language set: en, ar, es, ru, zh, and ja.
cd vscode-seen
npm install
npm run package
code --install-extension seen-*.vsix
seen lsp.import, use, and pub import declarations.seen compile, seen check, seen run, and seen pkg commands.| Command | Typical CLI |
|---|---|
| Seen: Build Project | seen compile <file> [output] |
| Seen: Run Project | seen run <file> |
| Seen: Check Project | seen check <file> |
| Seen: Compile Shared Module Objects | seen compile ... --pic --object-manifest <path> |
| Seen: Package Fetch | seen pkg fetch |
| Seen: Package Pack | seen pkg pack |
| Seen: Package Prebuild | seen pkg prebuild |
| Seen: Package Publish | seen pkg publish (authorized internal publishing) |
| Seen: Translate to Another Language | seen translate <file> --from <lang> --to <lang> |
Extension-only commands such as update checks or visual helpers are editor UI features; compiler behavior remains controlled by the seen CLI.
The official development registry uses its embedded root and serves live public TUF metadata and catalog reads. Custom registries still require an out-of-band root. Authorized internal publishes remain delayed, unavailable, and invisible to resolution. Hosted login, private-package access, yanking, and reporting are inactive, and the production registry is absent.
{
"seen.compiler.path": "seen",
"seen.lsp.enabled": true,
"seen.lsp.trace.server": "off",
"seen.formatting.enable": true,
"seen.target.default": "native",
"seen.compile.pic": false,
"seen.compile.objectManifest": "",
"seen.language.default": "en"
}
Start the built-in language server:
seen lsp
The server resolves project language from nearby Seen.toml when possible and falls back to English. It masks /// ... /// block comments for source-symbol operations and supports completions/hover for packages, annotations, effects, capabilities, hot reload, imports, sealed classes, exports, new collection and memory types, and stdlib modules.
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))
Use the shipped checker for frontend/type diagnostics:
seen check src/main.seen
Use deterministic mode when auditing reproducibility-sensitive code:
seen check src/main.seen --profile deterministic
The checker and LSP surface warning diagnostics for conservative dead-code cases, including unreachable statements, unused locals or parameters, unused private top-level functions, and unused imports. Warning codes are reported as warnings in editor clients rather than promoted to errors.
Useful environment-variable tracing:
SEEN_DEBUG_TYPES=1 seen compile program.seen program
SEEN_TRACE_LLVM=all seen compile program.seen program
SEEN_TRACE_LLVM=gep seen compile program.seen program
LLVM and compile-database emission are compile flags:
seen compile program.seen program --emit-llvm
seen compile program.seen program --emit-compile-db
On pacman-compatible Linux hosts, create a local AArch64 cross sysroot without installing system packages globally:
./scripts/setup_linux_arm64_sysroot.sh
source artifacts/toolchains/linux-arm64/env.sh
The helper downloads and extracts cross-packages under artifacts/toolchains/linux-arm64/. The generated env.sh sets SEEN_LINUX_ARM64_SYSROOT and SEEN_LINUX_ARM64_GCC_TOOLCHAIN.
Validate the setup:
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
Seen supports linux-riscv64 as an RV64GC Linux GNU userspace target. The canonical target list and triples are documented in Compilation Targets. On pacman-compatible Linux hosts, install system packages directly or create a local sysroot:
sudo pacman -Syu --needed clang llvm lld file qemu-user qemu-user-static qemu-system-riscv qemu-system-riscv-firmware riscv64-linux-gnu-binutils riscv64-linux-gnu-gcc riscv64-linux-gnu-glibc
# Optional local sysroot instead of relying on /usr/riscv64-linux-gnu:
./scripts/setup_linux_riscv64_sysroot.sh
source artifacts/toolchains/linux-riscv64/env.sh
Validate the fast emulator tier with QEMU user-mode:
bash scripts/test_riscv64_qemu.sh --compiler compiler_seen/target/seen --require
bash scripts/native_target_smoke.sh --compiler compiler_seen/target/seen --target linux-riscv64
For full guest validation, provide a RISC-V Linux kernel/rootfs with SSH and run:
SEEN_RISCV64_QEMU_KERNEL=/path/to/Image \
SEEN_RISCV64_QEMU_ROOTFS=/path/to/rootfs.qcow2 \
SEEN_RISCV64_QEMU_IDENTITY=/path/to/key \
bash scripts/test_riscv64_system_qemu.sh --compiler compiler_seen/target/seen --require
Generate Seen bindings from a C header:
seen import-c mylib.h
The command outputs extern fun declarations that can be copied into Seen source or package interface modules.