Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Standard Library

Flint is deliberately biased toward a strong standard library instead of a large package ecosystem for common work.

The Goal

The standard library should cover the tasks that most programs need without forcing every project into a dependency hunt.

That is especially important for embedded systems, where:

  • code size matters,
  • auditability matters,
  • and deployment constraints are tighter than they are on desktops and servers.

Layered Design

The current standard library design is layered:

  • Layer 0: core building blocks such as math, formatting, comparison, hashing, and iteration.
  • Layer 1: collections and encoding.
  • Layer 2: time.
  • Layer 3: MCU-facing hardware abstraction.

Cross-Target Intent

The long-term goal is for common code to work across MCU and non-MCU targets where that makes sense. The MCU-specific pieces should still feel like part of one coherent platform, not a separate language.

That is why Flint uses standard library paths such as:

use json
use micro/gpio
use time/delay

The namespace tells you what kind of capability you are using without adding a package-manager step to get started.