Documentation

Everything here describes nightly, the current release. Ignis is experimental: syntax changes between versions, and pages marked experimental are the ones most likely to move.

ReferenceStandard library APIEvery declaration in 58 modules, generated from the doc comments in the sources this version was built from.

Getting started

  • Installation

    Install the Ignis compiler from a release archive or build it from source.

  • Your first program

    Create a project, write a program that compiles, and run the binary.

  • Project layout

    What ignis init writes, and every section of the ignis.toml manifest.

Language

  • Types and literals

    The primitive types, what each one holds, and the coercions the compiler will and will not perform.

  • Records

    Named product types with fields, methods, static members and layout attributes.

  • Enums and variants

    Sum types with payloads, methods and static members, and the enums that power the try operator.

  • Generics

    Type parameters on functions, records, enums and aliases, and how the compiler specializes them.

  • Traits

    Shared behaviour declared as a contract, plus the three lang traits the compiler enforces itself.

  • Pattern matching

    match expressions, if let, while let and let else — one pattern grammar across all four.

  • Ownership and borrowing

    Moves, copies, clones, drops and the exclusivity rules the borrow checker enforces.

  • Closures

    Anonymous functions, the capture modes the compiler infers, and what @noescape buys you.

  • Control flow

    Conditions, loops, defer, and the statements that leave a block.

  • Expressions and operators

    Literals, the operator set, casts, the try operator and the pipe.

  • Template literals

    Backtick strings with ${} interpolation, what a slot accepts, and why interpolating a variable does not move it.

  • Modules and imports

    Namespaces, import and export forms, extern blocks, and how an import path is resolved.

  • Attributes and directives

    The @ annotations on declarations and parameters, and the compile-time directive surface.

  • Builtins

    The compiler-resolved operations, what each returns, and which three of them stop the program.

Standard library

  • Data structures

    Choosing between str and String, arrays and Vector, and the three hash-based collections.

Tooling

  • CLI reference

    The ignis command — building, checking, testing, formatting and creating projects.

  • Formatter

    Canonical layout, the four settings that control it, and the cases where the formatter refuses to guess.

  • Testing

    Writing @test functions, the assertions available, and how snapshots are stored and updated.