// reference

Library Index

This section documents Nex libraries shipped under the repository lib/ directory.

Unlike built-in runtime classes, these libraries may be platform-specific and must be loaded with intern.

Categories

  • Data Libraries - data/Json for JSON parsing and serialization, data/Sexpr, data/Byte_Array for packed byte buffers, data/Result/data/Option for error handling and optional values, and data/Mutex for exclusive access to a shared value across tasks
  • Audio Libraries - audio/Sound for short sound effects (loaded or generated tones), audio/Music for recorded tracks, audio/Synth for MIDI notes played live, audio/Midi_Score and audio/Midi_Song for music written in code or loaded from MIDI files, all working silently without a sound device
  • Graphics Libraries - graphics/Canvas for 2D drawing in user coordinates, shown in a window or saved as an image, with mouse and keyboard input and pictures loaded from image files, plus graphics/Color, graphics/Font, graphics/Key and graphics/Picture
  • IO Libraries - io/Path, io/Directory, io/Text_File, and io/Binary_File for filesystem and file I/O
  • Text Libraries - text/Regex for reusable regular-expression matching and replacement
  • Time Libraries - time/Date_Time and time/Duration for UTC timestamps and time spans
  • Networking Libraries - Http_Client, Http_Server, and TCP wrappers under lib/net

One library is loaded for you: lang/Exception, the built-in exception classes, is interned automatically into any program that has a rescue or names one of its classes.

Conventions

  • Library pages state their platform scope explicitly
  • Load library classes with intern path/Class_Name
  • File lookup follows the current intern resolver: loaded file directory, current working directory, then ~/.nex/deps