Standard library

September 4, 2024 ยท View on GitHub

An overview of the ML standard library.

Dependencies

DependencyRequired by
tiny-regex-cstdlib/re (Coming soon...)
sdsstdlib/string
gcstdlib/builtin/alloc

Motivation

Important

Ported functions from the c library are regarded as unsafe in terms of type and memory safety, unlike their ML counterparts. Using c bindings should be avoided where safer ML libraries are available.

The standard library permits the use of both unsafe c standard library functions (for embedded systems and nostalgic c programmers) and their safe ML counterparts, plus some other useful modern libraries, like string and convert.

Modules

Tip

Click on a module to display its documentation.

ModuleParent dir.Description
forbuiltinConvenient for-based constructs and looping utilities
allocbuiltinCustomizable memory allocation utilities
cdefscCommonly used c type definitions
cstdlibcBindings for ported functions of the c standard library
cstargcBindings for the stdarg.h c library
printioExtendable and safe frontend for printf/fprintf
readioExtendable and safe frontend for scanf/fscanf
fileioA frontend for c file-related functions
convert-Type conversion library
debug-Customizable rust-like assertables and panic macros
string-Functional-like string library
macro-Stand-alone convenience macros
backendallocBindings for the gc.h c library (Garbage collector)
backendstringBindings for the sds.h c library (Simple Dynamic Strings)
va_utilslegacySimplistic stdarg.h-like implementation for the assembly backend (deprecated)