Standard Library
Built-in modules available in Reox for NeolyxOS development.
Available Modules
prelude
Core functions, types, colors, and UI widgets.
nxrender
Low-level NeolyxOS graphics and window API.
transition
Animations, transitions, and motion effects.
network
HTTP, TCP, UDP, and DNS networking.
system
File I/O, process control, and environment.
gesture
Touch and gesture recognition.
Core Functions (prelude)
Automatically imported in every Reox program.
print(text) / println(text)
Output text to console.
len(collection)
Get length of array or string.
push(array, item) / pop(array)
Add/remove items from arrays.
map_new() / map_get() / map_set()
Key-value hashmap operations.
Transition Module
Animation and transition effects for UI.
import transition;
// Create a transition
let t = transition_ease_out(300); // 300ms ease-out
// Animate view properties
view_animate_opacity(button, 1.0, t);
view_animate_scale(card, 1.1, t);
view_fade_in(panel, t);
view_slide_in(menu, 0, t); // 0=left, 1=right, 2=top, 3=bottom
// Preset animations
preset_pulse(icon, 500);
preset_shake(error_label, 0.5);
preset_bounce(success_badge);Transition Types
transition_linear()transition_ease()transition_ease_in()transition_ease_out()transition_spring()transition_bounce()transition_elastic()transition_cubic_bezier()NXRender Module
Direct access to NeolyxOS native rendering engine.
import nxrender;
// Create window
let win = nx_window_create("My App", 100, 100, 800, 600);
nx_window_center(win);
// Create widgets
let btn = nx_button_create("Click Me");
let label = nx_label_create("Hello World");
let field = nx_textfield_create("Enter text...");
// Build widget tree
let container = nx_vstack_create(12);
nx_widget_add_child(container, label);
nx_widget_add_child(container, field);
nx_widget_add_child(container, btn);
// Set root and run
nx_window_set_root(win, container);
nx_window_show(win);
nx_event_loop_run();UI Module (prelude)
High-level UI components from prelude for building applications.
- App - Application lifecycle management
- Window - Top-level window containers
- View - Layout containers (hstack, vstack, zstack, grid)
- Controls - Button, Slider, TextField, Toggle, Checkbox
- Forms - Form fields, pickers, date/time selectors
- Colors - Theme-aware system colors
- State - Reactive state management with auto-update
System Module
File I/O, process control, and environment access.
import system;
// File operations
let content = file_read("config.json");
file_write("log.txt", "Application started");
let exists = file_exists("data.db");
// Environment
let home = env_get("HOME");
let args = sys_args();
// Process control
sys_exit(0);Network Module
HTTP requests and networking.
import network;
// HTTP GET request
let response = await http_get("https://api.example.com/data");
// HTTP POST with JSON body
let result = await http_post("https://api.example.com/submit", body);
// DNS lookup
let ip = dns_resolve("example.com");