Start / Silk Documentation

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

If you’re new to Silk, this is a good order:

  1. What Silk is for: design goals, constraints, and the mental model.
  2. Hello world: the smallest working program and the check → test → build loop.
  3. Language tour: the shape of real programs (types, functions, control flow, errors).
  4. Modules & packages: how code is organized and how imports/exports create clean dependency boundaries.
  5. Project dependencies: how to build an application with path and package-search dependencies, using Cove as the reference layout.
  6. Practical logger module: a reusable logging package walkthrough with configuration, sinks, targets, ABI notes, and publication.
  7. Standard library: what lives in std:: and the common patterns it uses.
  8. CLI and toolchain: module sets, build targets, package manifests, package distribution, docs/man, and diagnostics.
  9. Testing: language-level tests and TAP output for CI and tooling.
  10. Formal Silk: opt-in proofs with Z3; how to write verified code with zero runtime cost.
  11. GPU programming: portable device functions, checked launch blocks, std::gpu, and AMD/NVIDIA backends.
  12. Platform applications: manifest-driven iOS bundles plus device and signing workflows.

Start here:

Source repository · Edit this page · View Markdown