Hew reference

Guides

Start here

  • BasicsWrite a first program and work with values, collections, and basic types.
  • Core conceptsUnderstand ownership, messages, actors, and task lifecycles.
  • Control flowChoose with if and match, loop, and return values from blocks.

Build programs

Concurrent systems

Specialized tools

Standard library

Import a module by its dotted name. Each page lists its public declarations and methods.

  • std.arenaGenerational-index slotmap (Arena<T>).
  • std.benchBenchmarks run with hew bench on the host clock.
  • std.builtinsBuilt-in types, traits, and functions available in every Hew program.
  • std.cliCommand-line parsing over supplied argument strings.
  • std.dequeDouble-ended queue (deque).
  • std.failureCrash details and recovery decisions for actor lifecycle hooks.
  • std.fmtInteger formatting utilities.
  • std.fsFile system operations.
  • std.ioStandard I/O operations.
  • std.iterIterator combinators for Vec<T> and any Iterator implementation.
  • std.lazyA single-owner value initialized on first demand.
  • std.link_monitorActor monitor and link handle helpers.
  • std.logStructured logging with level filters and text or JSON output.
  • std.mathMathematical operations.
  • std.metricsDeveloper-defined application metrics.
  • std.netTCP networking.
  • std.observeRuntime observability reads.
  • std.optionInspect, transform, or extract a value that may be absent.
  • std.osOperating system interfaces.
  • std.pathFile path and glob utilities.
  • std.pipelineBounded concurrent adapters for owned iterators.
  • std.processProcess execution.
  • std.randomSeedable pseudo-random number generation.
  • std.restartRestart delay policies for supervisor declarations.
  • std.resultInspect, transform, or add context to an explicit success or error value.
  • std.semaphoreCounting semaphore for concurrency control.
  • std.sortStable sorting and reversal for vectors.
  • std.streamTyped streams and sinks for in-memory pipes, files, sockets, and actors.
  • std.stringstring conversion and manipulation utilities.
  • std.testingControls for deterministic Hew tests and runs.
  • std.uuidUUID generation and validation.
  • std.vecGeneric vector utilities. Empty vectors return None for lookups and extrema.

concurrency

crypto

encoding

io

  • std.io.scannerLine-by-line and word-by-word scanner (bufio.Scanner-style).

machine

net

text

time