Silk Documentation
Silk is a high performance general purpose programming language with formal verification built in. Silk targets computer systems, mobile / tablet devices, WASM / WASI runtimes, and the web.
This documentation site is written for downstream users. It is organized into:
- Guides — purpose, mental model, hello worlds, and practical workflows.
- Reference — the detailed language, standard library, CLI, and ABI surfaces.
If you’re setting up a workspace, start with: Getting started.
A minimal “hello world”#
Silk programs are ordinary .slk files. A small program can look like this:
import { println } from "std/io";
fn main () -> int {
println("hello from silk");
return 0;
}
From here, you can:
- explore the guided path in Guides
- jump straight to a topic in Reference (language,
std::, tooling) - use search to find concepts by name
Recommended reading path#
If you’re new to Silk, this is a good order:
- What Silk is for: design goals, constraints, and the mental model.
- Hello world: the smallest working program and the
check → test → buildloop. - Language tour: the shape of real programs (types, functions, control flow, errors).
- Modules & packages: how code is organized and how imports/exports create clean dependency boundaries.
- Project dependencies: how to build an application with path and package-search dependencies, using Cove as the reference layout.
- Practical logger module: a reusable logging package walkthrough with configuration, sinks, targets, ABI notes, and publication.
- Standard library: what lives in
std::and the common patterns it uses. - CLI and toolchain: module sets, build targets, package manifests, package distribution, docs/man, and diagnostics.
- Testing: language-level tests and TAP output for CI and tooling.
- Formal Silk: opt-in proofs with Z3; how to write verified code with zero runtime cost.
- GPU programming: portable device functions, checked launch blocks,
std::gpu, and AMD/NVIDIA backends. - Platform applications: manifest-driven iOS bundles plus device and signing workflows.
Start here:
- Usage: Getting started
- Reference: Implementation status · Diagnostics
- Reference: Package manifests · Package distribution
- Reference:
silkCLI ·silk-package(1) - Guides: What Silk is for
- Guides: Hello world · Language tour · Modules & packages · Project dependencies
- Guides: Practical logger module · Standard library · CLI and toolchain
- Guides: Testing · Formal Silk
- Tutorials: Concurrency basics · Async I/O + Streams + Abort Signals · Formal Silk in real code
- GPU: Execution placement · Launch blocks ·
std::gpu· Pure-Silk CPU/GPU program - Platform apps: Build LumenTrail for iOS ·
silk-devices(1)·silk-codesign(1) - Spec: Silk Spec (2026)
Source repository · Edit this page · View Markdown