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/Jsonfor JSON parsing and serialization,data/Sexpr,data/Byte_Arrayfor packed byte buffers,data/Result/data/Optionfor error handling and optional values, anddata/Mutexfor exclusive access to a shared value across tasks - Audio Libraries -
audio/Soundfor short sound effects (loaded or generated tones),audio/Musicfor recorded tracks,audio/Synthfor MIDI notes played live,audio/Midi_Scoreandaudio/Midi_Songfor music written in code or loaded from MIDI files, all working silently without a sound device - Graphics Libraries -
graphics/Canvasfor 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, plusgraphics/Color,graphics/Font,graphics/Keyandgraphics/Picture - IO Libraries -
io/Path,io/Directory,io/Text_File, andio/Binary_Filefor filesystem and file I/O - Text Libraries -
text/Regexfor reusable regular-expression matching and replacement - Time Libraries -
time/Date_Timeandtime/Durationfor UTC timestamps and time spans - Networking Libraries -
Http_Client,Http_Server, and TCP wrappers underlib/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
internresolver: loaded file directory, current working directory, then~/.nex/deps