Skip to main content

Crate pepl_stdlib

Crate pepl_stdlib 

Source
Expand description

PEPL Standard Library

88 Phase 0 functions across 9 pure modules + 4 capability modules. All pure functions are deterministic and execute in < 1ms. Capability modules validate arguments and yield to the host via CapabilityCall.

§Pure Modules

ModuleFunctionsDescription
core4Logging, assertions, type inspection, capability check
math10 + 2 constantsArithmetic beyond basic operators
string20String manipulation
list31List construction, query, transformation, higher-order
record5Record field access and manipulation
time5Host-provided timestamps and formatting
convert5Type conversion (fallible and infallible)
json2JSON parse/stringify
timer4Recurring and one-shot timer scheduling

§Capability Modules

ModuleFunctionscap_idDescription
http51HTTP requests (get, post, put, patch, delete)
storage42Persistent key-value storage (get, set, delete, keys)
location13GPS/location access (current)
notifications14Push notifications (send)

Modules§

capability
Capability ID mappings for env.host_call dispatch.
modules
Stdlib module implementations.

Structs§

StdlibFn
A callable function value for higher-order stdlib operations.

Enums§

ResultValue
The two variants of a PEPL Result value.
StdlibError
Errors that can occur when calling stdlib functions.
Value
Runtime value in PEPL.

Traits§

StdlibModule
Trait implemented by each PEPL stdlib module.