Skip to main content

pepl_stdlib/
lib.rs

1//! PEPL Standard Library
2//!
3//! 88 Phase 0 functions across 9 pure modules + 4 capability modules.
4//! All pure functions are deterministic and execute in < 1ms.
5//! Capability modules validate arguments and yield to the host via `CapabilityCall`.
6//!
7//! # Pure Modules
8//!
9//! | Module | Functions | Description |
10//! |--------|-----------|-------------|
11//! | `core` | 4 | Logging, assertions, type inspection, capability check |
12//! | `math` | 10 + 2 constants | Arithmetic beyond basic operators |
13//! | `string` | 20 | String manipulation |
14//! | `list` | 31 | List construction, query, transformation, higher-order |
15//! | `record` | 5 | Record field access and manipulation |
16//! | `time` | 5 | Host-provided timestamps and formatting |
17//! | `convert` | 5 | Type conversion (fallible and infallible) |
18//! | `json` | 2 | JSON parse/stringify |
19//! | `timer` | 4 | Recurring and one-shot timer scheduling |
20//!
21//! # Capability Modules
22//!
23//! | Module | Functions | cap_id | Description |
24//! |--------|-----------|--------|-------------|
25//! | `http` | 5 | 1 | HTTP requests (get, post, put, patch, delete) |
26//! | `storage` | 4 | 2 | Persistent key-value storage (get, set, delete, keys) |
27//! | `location` | 1 | 3 | GPS/location access (current) |
28//! | `notifications` | 1 | 4 | Push notifications (send) |
29
30mod error;
31mod module;
32mod value;
33
34pub mod capability;
35pub mod modules;
36
37pub use error::StdlibError;
38pub use module::StdlibModule;
39pub use value::{ResultValue, StdlibFn, Value};