Modules#

I generate this inventory from modules/, discovery manifests, build manifests, and explicit public or foreign declarations. A module can be portable in principle without being supported by every backend.

ModuleStabilityNative build metadataDeclarationsSummary
audio_helpersexperimentalyes1Audio utility functions for common audio tasks.
audio_vizexperimentalyes5Audio visualization (spectrum, waveform, VU meters).
bulletexperimentalyes22Bullet Physics SDK integration for rigid body and soft body simulation.
compiler_supportunclassifiedyes2No discovery manifest yet.
curlstableyes17HTTP client for making web requests and downloading data.
dispatchunclassifiedyes26No discovery manifest yet.
eventexperimentalyes16Event handling system for publish-subscribe patterns.
examplesunclassifiedyes22No discovery manifest yet.
file_source_catalogunclassifiedyes4No discovery manifest yet.
filesystemexperimentalyes8Advanced filesystem operations (walk directory trees, glob patterns).
forth_seeexperimentalyes1NanoISA decompiler for the Forth SEE word. Reads .nvm bytecode and disassembles the implementation of any built-in Forth word down to NanoISA opcodes.
githubstableyes22GitHub REST API client for managing repositories, issues, pull requests, and more.
glewstableyes70OpenGL Extension Wrangler for loading OpenGL extensions.
glfwstableyes17OpenGL window management and input handling via GLFW.
glutstableyes38OpenGL Utility Toolkit for window management (legacy, prefer GLFW).
gpuunclassifiedyes36No discovery manifest yet.
http_serverstableyes32HTTP/1.1 server for serving web assets and REST APIs.
libcunclassifiedyes14No discovery manifest yet.
math_extstableyes11Extended math functions: trigonometry, logarithms, rounding, and constants.
mujocoexperimentalyes69MuJoCo simulation handles with body, geom, site, state, and control queries.
nano_evalexperimentalyes12Persistent NanoLang tree-walker session with editor host primitives.
nano_highlightexperimentalyes2NanoLang syntax highlighting and HTML formatting.
nano_toolsexperimentalyes8Tooling helpers for linting and syntax checks.
nanoisaexperimentalyes10I read and write .nvm modules and print canonical or detailed NanoISA assembly.
ncursesstableyes29Terminal UI with colors, cursor control, and keyboard input.
openaistableyes20OpenAI-compatible API client for chat completions, embeddings, and LLM interactions.
openglstableno13OpenGL graphics API bindings for 3D rendering.
preferencesexperimentalyes4Configuration and settings storage for applications.
proptestexperimentalyes21Property-based testing helpers for NanoLang programs.
pt2_audioexperimentalyes5ProTracker 2 audio engine for MOD file playback.
pt2_moduleexperimentalyes14ProTracker 2 MOD file loader and parser.
pt2_stateexperimentalyes36ProTracker 2 state management for tracker UI.
ptyexperimentalyes7POSIX pseudo-terminal bindings — open a PTY, fork a subprocess, relay its I/O.
pybridgeexperimentalyes20Bridge to Python via a helper process with JSON-RPC messaging.
pybridge_matplotlibexperimentalyes3Matplotlib renderer adapter using the pybridge helper process.
pybridge_warpexperimentalyes10GPU-accelerated 2D fluid simulation using NVIDIA Warp via the pybridge helper process.
readlinestableyes29Interactive line editing with history, completion, and Emacs/vi key bindings.
sdlstableyes40Windowed 2D graphics, input, and audio via SDL2 library.
sdl_helpersstableyes23SDL utility functions for common tasks (drawing, input polling, font loading).
sdl_imagestableyes76SDL_image - Load PNG, JPG, and other image formats into SDL textures.
sdl_mixerstableyes34SDL audio mixing for music and sound effects.
sdl_termexperimentalyes14SDL2 terminal emulator — embed a VT100-compatible terminal in any SDL window.
sdl_ttfstableyes20SDL TrueType font rendering via SDL2_ttf.
sqlitestableyes61Embedded SQL database for structured data storage and queries.
stdstableyes394Standard library with file I/O, process execution, environment variables.
stdiostableyes14Standard I/O operations (print, println, read_line).
stdlibstableno5Extended standard library utilities (deprecated, use std).
toolsexperimentalno2Development tools and utilities for NanoLang projects.
ui_widgetsexperimentalyes21UI widget library (buttons, sliders, text inputs) for SDL.
unicodeexperimentalyes11Unicode string handling and UTF-8 operations.
uvstableyes25libuv asynchronous I/O for non-blocking operations.
vector2dstableyes182D vector mathematics (add, subtract, normalize, dot product, etc.).
websocketunclassifiedyes14No discovery manifest yet.

audio_helpers#

Audio utility functions for common audio tasks.

Source: modules/audio_helpers/

SourcePublic or foreign declaration
modules/audio_helpers/audio_helpers.nanoextern fn audio_convert_raw_to_wav(_raw_file: string, _wav_file: string, _sample_rate: int) -> int

audio_viz#

Audio visualization (spectrum, waveform, VU meters).

Source: modules/audio_viz/

SourcePublic or foreign declaration
modules/audio_viz/audio_viz.nanoextern fn nl_audio_viz_init(_format: int, _channels: int) -> void
modules/audio_viz/audio_viz.nanoextern fn nl_audio_viz_get_channel_volume_int(_channel: int) -> int
modules/audio_viz/audio_viz.nanoextern fn nl_audio_viz_get_waveform_sample(_channel: int, _index: int) -> float
modules/audio_viz/audio_viz.nanoextern fn nl_audio_viz_get_waveform_size() -> int
modules/audio_viz/audio_viz.nanoextern fn nl_audio_viz_shutdown() -> void

bullet#

Bullet Physics SDK integration for rigid body and soft body simulation.

Source: modules/bullet/

SourcePublic or foreign declaration
modules/bullet/bullet.nanoextern fn nl_bullet_init() -> int
modules/bullet/bullet.nanoextern fn nl_bullet_cleanup() -> void
modules/bullet/bullet.nanoextern fn nl_bullet_step(_time_step: float) -> void
modules/bullet/bullet.nanoextern fn nl_bullet_set_gravity(_gx: float, _gy: float, _gz: float) -> void
modules/bullet/bullet.nanoextern fn nl_bullet_create_soft_sphere(
modules/bullet/bullet.nanoextern fn nl_bullet_create_rigid_sphere(
modules/bullet/bullet.nanoextern fn nl_bullet_create_rigid_box(
modules/bullet/bullet.nanoextern fn nl_bullet_create_rigid_box_rotated(
modules/bullet/bullet.nanoextern fn nl_bullet_get_soft_body_count() -> int
modules/bullet/bullet.nanoextern fn nl_bullet_get_soft_body_node_count(_handle: int) -> int
modules/bullet/bullet.nanoextern fn nl_bullet_get_soft_body_node_x(_handle: int, _node_idx: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_soft_body_node_y(_handle: int, _node_idx: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_soft_body_node_z(_handle: int, _node_idx: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_remove_soft_body(_handle: int) -> void
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_count() -> int
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_x(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_y(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_z(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_rot_x(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_rot_y(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_rot_z(_handle: int) -> float
modules/bullet/bullet.nanoextern fn nl_bullet_get_rigid_body_rot_w(_handle: int) -> float

compiler_support#

No discovery manifest yet.

Source: modules/compiler_support/

SourcePublic or foreign declaration
modules/compiler_support/compiler_support.nanoextern fn nlc_module_artifact(source_path: string) -> string
modules/compiler_support/compiler_support.nanopub fn module_artifact(source_path: string) -> string {

curl#

HTTP client for making web requests and downloading data.

Source: modules/curl/

SourcePublic or foreign declaration
modules/curl/curl.nanoextern fn nl_curl_global_init() -> int
modules/curl/curl.nanoextern fn nl_curl_global_cleanup() -> void
modules/curl/curl.nanoextern fn nl_curl_easy_init() -> int
modules/curl/curl.nanoextern fn nl_curl_easy_cleanup(_handle: int) -> void
modules/curl/curl.nanopub fn curl_global_init_safe() -> int {
modules/curl/curl.nanopub fn curl_global_cleanup_safe() -> void {
modules/curl/curl.nanopub fn curl_easy_init_safe() -> int {
modules/curl/curl.nanopub fn curl_easy_cleanup_safe(handle: int) -> void {
modules/curl/curl.nanoextern fn nl_curl_simple_get(_url: string) -> string
modules/curl/curl.nanoextern fn nl_curl_simple_post(_url: string, _data: string) -> string
modules/curl/curl.nanoextern fn nl_curl_download_file(_url: string, _output_path: string) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_setopt_url(_handle: int, _url: string) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_setopt_follow_location(_handle: int, _follow: int) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_setopt_timeout(_handle: int, _timeout_secs: int) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_setopt_useragent(_handle: int, _useragent: string) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_perform(_handle: int) -> int
modules/curl/curl.nanoextern fn nl_curl_easy_getinfo_response_code(_handle: int) -> int

dispatch#

No discovery manifest yet.

Source: modules/dispatch/

SourcePublic or foreign declaration
modules/dispatch/dispatch.nanoextern fn nl_queue_serial(label: string) -> NlQueue
modules/dispatch/dispatch.nanoextern fn nl_queue_concurrent(label: string) -> NlQueue
modules/dispatch/dispatch.nanoextern fn nl_queue_destroy(q: NlQueue) -> void
modules/dispatch/dispatch.nanoextern fn nl_queue_async(q: NlQueue, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_queue_sync(q: NlQueue, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_queue_barrier_async(q: NlQueue, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_queue_after_ns(q: NlQueue, ns: int, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_group_create() -> NlQueueGroup
modules/dispatch/dispatch.nanoextern fn nl_group_destroy(g: NlQueueGroup) -> void
modules/dispatch/dispatch.nanoextern fn nl_group_async(g: NlQueueGroup, q: NlQueue, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_group_notify(g: NlQueueGroup, q: NlQueue, blk: fn() -> void) -> void
modules/dispatch/dispatch.nanoextern fn nl_group_wait_ns(g: NlQueueGroup, timeout_ns: int) -> int
modules/dispatch/dispatch.nanoextern fn nl_dispatch_available() -> int
modules/dispatch/dispatch.nanopub fn queue_serial(label: string) -> NlQueue {
modules/dispatch/dispatch.nanopub fn queue_concurrent(label: string) -> NlQueue {
modules/dispatch/dispatch.nanopub fn queue_destroy(q: NlQueue) -> void {
modules/dispatch/dispatch.nanopub fn queue_async(q: NlQueue, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn queue_sync(q: NlQueue, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn queue_barrier_async(q: NlQueue, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn queue_after_ms(q: NlQueue, delay_ms: int, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn group_create() -> NlQueueGroup {
modules/dispatch/dispatch.nanopub fn group_destroy(g: NlQueueGroup) -> void {
modules/dispatch/dispatch.nanopub fn group_async(g: NlQueueGroup, q: NlQueue, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn group_notify(g: NlQueueGroup, q: NlQueue, blk: fn() -> void) -> void {
modules/dispatch/dispatch.nanopub fn group_wait_ms(g: NlQueueGroup, timeout_ms: int) -> int {
modules/dispatch/dispatch.nanopub fn dispatch_available() -> bool {

event#

Event handling system for publish-subscribe patterns.

Source: modules/event/

SourcePublic or foreign declaration
modules/event/event.nanoextern fn nl_event_base_new() -> int
modules/event/event.nanoextern fn nl_event_base_free(_base: int) -> void
modules/event/event.nanoextern fn nl_event_base_dispatch(_base: int) -> int
modules/event/event.nanoextern fn nl_event_base_loop(_base: int, _flags: int) -> int
modules/event/event.nanoextern fn nl_event_base_loopexit(_base: int, _timeout_secs: int) -> int
modules/event/event.nanoextern fn nl_event_base_loopbreak(_base: int) -> int
modules/event/event.nanoextern fn nl_event_base_get_method(_base: int) -> string
modules/event/event.nanoextern fn nl_event_base_get_num_events(_base: int) -> int
modules/event/event.nanoextern fn nl_event_get_version() -> string
modules/event/event.nanoextern fn nl_event_get_version_number() -> int
modules/event/event.nanoextern fn nl_evtimer_new(_base: int) -> int
modules/event/event.nanoextern fn nl_event_free(_event: int) -> void
modules/event/event.nanoextern fn nl_evtimer_add_timeout(_event: int, _timeout_secs: int) -> int
modules/event/event.nanoextern fn nl_event_del(_event: int) -> int
modules/event/event.nanoextern fn nl_event_enable_debug_mode() -> void
modules/event/event.nanoextern fn nl_event_sleep(_base: int, _seconds: int) -> int

examples#

No discovery manifest yet.

Source: modules/examples/

SourcePublic or foreign declaration
modules/examples/diag.nanoextern fn nl_examples_flush() -> void
modules/examples/diag.nanoextern fn nl_examples_timestamp_ms() -> int
modules/examples/diag.nanopub fn emit_event(event_type: string, example_name: string) -> void {
modules/examples/diag.nanopub fn emit_event_kv(event_type: string, example_name: string, key: string, value: string) -> void {
modules/examples/diag.nanopub fn example_start(name: string) -> void {
modules/examples/diag.nanopub fn example_pass(name: string) -> void {
modules/examples/diag.nanopub fn example_fail(name: string, reason: string) -> void {
modules/examples/diag.nanopub fn timestamp_ms() -> int {
modules/examples/diag.nanopub fn example_metric(name: string, metric_key: string, metric_value: int) -> void {
modules/examples/meta.nanopub struct ExampleMeta {
modules/examples/meta.nanopub fn meta_empty(source_file: string) -> ExampleMeta {
modules/examples/meta.nanopub fn parse_meta_from_content(content: string, source_file: string) -> ExampleMeta {
modules/examples/meta.nanopub fn parse_meta(file_path: string) -> ExampleMeta {
modules/examples/meta.nanopub fn meta_to_json(meta: ExampleMeta) -> string {
modules/examples/runner.nanopub struct TestResult {
modules/examples/runner.nanopub fn run_example(meta: ExampleMeta, compiler: string, mode: string) -> TestResult {
modules/examples/runner.nanopub fn run_all(dir: string, compiler: string, mode: string) -> array<TestResult> {
modules/examples/runner.nanopub fn count_passed(results: array<TestResult>) -> int {
modules/examples/runner.nanopub fn count_failed(results: array<TestResult>) -> int {
modules/examples/runner.nanopub fn print_report(results: array<TestResult>) -> void {
modules/examples/runner.nanopub fn result_to_json(r: TestResult) -> string {
modules/examples/runner.nanopub fn report_json(results: array<TestResult>) -> string {

file_source_catalog#

No discovery manifest yet.

Source: modules/file_source_catalog/

SourcePublic or foreign declaration
modules/file_source_catalog/file_source_catalog.nanoextern fn nl_file_source_catalog_string(kind: int, ordinal: int, field: int, member: int) -> string
modules/file_source_catalog/file_source_catalog.nanoextern fn nl_file_source_catalog_number(kind: int, ordinal: int, field: int, member: int) -> int
modules/file_source_catalog/file_source_catalog.nanopub fn text(kind: int, ordinal: int, field: int, member: int) -> string {
modules/file_source_catalog/file_source_catalog.nanopub fn number(kind: int, ordinal: int, field: int, member: int) -> int {

filesystem#

Advanced filesystem operations (walk directory trees, glob patterns).

Source: modules/filesystem/

SourcePublic or foreign declaration
modules/filesystem/filesystem.nanoextern fn nl_fs_list_files(_path: string, _extension: string) -> array<string>
modules/filesystem/filesystem.nanoextern fn nl_fs_list_files_ci(_path: string, _extension: string) -> array<string>
modules/filesystem/filesystem.nanoextern fn nl_fs_list_dirs(_path: string) -> array<string>
modules/filesystem/filesystem.nanoextern fn nl_fs_parent_dir(_path: string) -> string
modules/filesystem/filesystem.nanoextern fn nl_fs_is_directory(_path: string) -> int
modules/filesystem/filesystem.nanoextern fn nl_fs_file_exists(_path: string) -> int
modules/filesystem/filesystem.nanoextern fn nl_fs_file_size(_path: string) -> int
modules/filesystem/filesystem.nanoextern fn nl_fs_join_path(_dir: string, _filename: string) -> string

forth_see#

NanoISA decompiler for the Forth SEE word. Reads .nvm bytecode and disassembles the implementation of any built-in Forth word down to NanoISA opcodes.

Source: modules/forth_see/

SourcePublic or foreign declaration
modules/forth_see/forth_see.nanoextern fn nl_forth_see(_word: string, _nvm_path: string) -> string

github#

GitHub REST API client for managing repositories, issues, pull requests, and more.

Source: modules/github/

SourcePublic or foreign declaration
modules/github/github.nanoextern fn nl_github_get_repo(_owner: string, _repo: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_list_issues(_owner: string, _repo: string, _state: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_get_issue(_owner: string, _repo: string, _issue_number: int, _token: string) -> string
modules/github/github.nanoextern fn nl_github_create_issue(_owner: string, _repo: string, _title: string, _body: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_update_issue(_owner: string, _repo: string, _issue_number: int, _title: string, _body: string, _state: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_create_issue_comment(_owner: string, _repo: string, _issue_number: int, _body: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_list_prs(_owner: string, _repo: string, _state: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_get_pr(_owner: string, _repo: string, _pr_number: int, _token: string) -> string
modules/github/github.nanoextern fn nl_github_create_pr(_owner: string, _repo: string, _title: string, _body: string, _head: string, _base: string, _token: string) -> string
modules/github/github.nanoextern fn nl_github_get_token_from_env() -> string
modules/github/github.nanoextern fn nl_github_check_rate_limit(_token: string) -> int
modules/github/github.nanopub fn github_get_repo(owner: string, repo: string, token: string) -> string {
modules/github/github.nanopub fn github_list_issues(owner: string, repo: string, state: string, token: string) -> string {
modules/github/github.nanopub fn github_get_issue(owner: string, repo: string, issue_number: int, token: string) -> string {
modules/github/github.nanopub fn github_create_issue(owner: string, repo: string, title: string, body: string, token: string) -> string {
modules/github/github.nanopub fn github_update_issue(owner: string, repo: string, issue_number: int, title: string, body: string, state: string, token: string) -> string {
modules/github/github.nanopub fn github_create_issue_comment(owner: string, repo: string, issue_number: int, body: string, token: string) -> string {
modules/github/github.nanopub fn github_list_prs(owner: string, repo: string, state: string, token: string) -> string {
modules/github/github.nanopub fn github_get_pr(owner: string, repo: string, pr_number: int, token: string) -> string {
modules/github/github.nanopub fn github_create_pr(owner: string, repo: string, title: string, body: string, head: string, base: string, token: string) -> string {
modules/github/github.nanopub fn github_get_token_from_env() -> string {
modules/github/github.nanopub fn github_check_rate_limit(token: string) -> int {

glew#

OpenGL Extension Wrangler for loading OpenGL extensions.

Source: modules/glew/

SourcePublic or foreign declaration
modules/glew/glew.nanopub extern fn glewInit() -> int
modules/glew/glew.nanopub extern fn glewIsSupported(_extension: string) -> int
modules/glew/glew.nanopub extern fn glewGetString(_name: int) -> string
modules/glew/glew.nanopub extern fn glewGetErrorString(_error: int) -> string
modules/glew/glew.nanopub extern fn glGetError() -> int
modules/glew/glew.nanopub extern fn glGetString(_name: int) -> string
modules/glew/glew.nanopub extern fn glClear(_mask: int) -> void
modules/glew/glew.nanopub extern fn nlg_glClearColor(_r: float, _g: float, _b: float, _a: float) -> void
modules/glew/glew.nanopub extern fn glViewport(_x: int, _y: int, _width: int, _height: int) -> void
modules/glew/glew.nanopub extern fn glFlush() -> void
modules/glew/glew.nanopub extern fn glFinish() -> void
modules/glew/glew.nanopub extern fn glBegin(_mode: int) -> void
modules/glew/glew.nanopub extern fn glEnd() -> void
modules/glew/glew.nanopub extern fn nlg_glVertex2f(_x: float, _y: float) -> void
modules/glew/glew.nanopub extern fn nlg_glVertex3f(_x: float, _y: float, _z: float) -> void
modules/glew/glew.nanopub extern fn nlg_glColor3f(_r: float, _g: float, _b: float) -> void
modules/glew/glew.nanopub extern fn nlg_glColor4f(_r: float, _g: float, _b: float, _a: float) -> void
modules/glew/glew.nanopub extern fn glMatrixMode(_mode: int) -> void
modules/glew/glew.nanopub extern fn glLoadIdentity() -> void
modules/glew/glew.nanopub extern fn glOrtho(_left: float, _right: float, _bottom: float, _top: float, _near: float, _far: float) -> void
modules/glew/glew.nanopub extern fn glFrustum(_left: float, _right: float, _bottom: float, _top: float, _near: float, _far: float) -> void
modules/glew/glew.nanopub extern fn nlg_glTranslatef(_x: float, _y: float, _z: float) -> void
modules/glew/glew.nanopub extern fn nlg_glRotatef(_angle: float, _x: float, _y: float, _z: float) -> void
modules/glew/glew.nanopub extern fn nlg_glScalef(_x: float, _y: float, _z: float) -> void
modules/glew/glew.nanopub extern fn glShadeModel(_mode: int) -> void
modules/glew/glew.nanopub extern fn glColorMaterial(_face: int, _mode: int) -> void
modules/glew/glew.nanopub extern fn glEnable(_cap: int) -> void
modules/glew/glew.nanopub extern fn glDisable(_cap: int) -> void
modules/glew/glew.nanopub extern fn glPushAttrib(_mask: int) -> void
modules/glew/glew.nanopub extern fn glPopAttrib() -> void
modules/glew/glew.nanopub extern fn glPushMatrix() -> void
modules/glew/glew.nanopub extern fn glPopMatrix() -> void
modules/glew/glew.nanopub extern fn glPolygonMode(_face: int, _mode: int) -> void
modules/glew/glew.nanopub extern fn nlg_glLineWidth(_width: float) -> void
modules/glew/glew.nanopub extern fn nlg_glPointSize(_size: float) -> void
modules/glew/glew.nanopub extern fn glBlendFunc(_sfactor: int, _dfactor: int) -> void
modules/glew/glew.nanopub extern fn nlg_glNormal3f(_nx: float, _ny: float, _nz: float) -> void
modules/glew/glew.nanopub extern fn nl_glLightfv4(_light: int, _pname: int, _x: float, _y: float, _z: float, _w: float) -> void
modules/glew/glew.nanopub extern fn nl_glMaterialfv4(_face: int, _pname: int, _x: float, _y: float, _z: float, _w: float) -> void
modules/glew/glew.nanopub extern fn nlg_glMaterialf(_face: int, _pname: int, _param: float) -> void
modules/glew/glew.nanopub extern fn nl_gl3_create_program_from_sources(_vertex_src: string, _fragment_src: string) -> int
modules/glew/glew.nanopub extern fn nl_gl3_use_program(_program: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_delete_program(_program: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_get_uniform_location(_program: int, _name: string) -> int
modules/glew/glew.nanopub extern fn nl_gl3_uniform1f(_location: int, _v: float) -> void
modules/glew/glew.nanopub extern fn nl_gl3_uniform2f(_location: int, _x: float, _y: float) -> void
modules/glew/glew.nanopub extern fn nl_gl3_uniform1i(_location: int, _v: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_gen_vertex_array() -> int
modules/glew/glew.nanopub extern fn nl_gl3_bind_vertex_array(_vao: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_gen_buffer() -> int
modules/glew/glew.nanopub extern fn nl_gl3_bind_buffer(_target: int, _buffer: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_buffer_data_f32(_target: int, _data: array<float>, _usage: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_buffer_data_u32(_target: int, _data: array<int>, _usage: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_enable_vertex_attrib_array(_index: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_vertex_attrib_pointer_f32(_index: int, _size: int, _normalized: int, _stride_bytes: int, _offset_bytes: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_vertex_attrib_divisor(_index: int, _divisor: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_draw_arrays(_mode: int, _first: int, _count: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_draw_arrays_instanced(_mode: int, _first: int, _count: int, _instance_count: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_gen_texture() -> int
modules/glew/glew.nanopub extern fn nl_gl3_bind_texture(_target: int, _texture: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_active_texture(_texture_unit: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_tex_parami(_target: int, _pname: int, _param: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_tex_image_2d_checker_rgba8(_target: int, _width: int, _height: int, _squares: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_gen_framebuffer() -> int
modules/glew/glew.nanopub extern fn nl_gl3_bind_framebuffer(_target: int, _fbo: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_framebuffer_texture_2d(_target: int, _attachment: int, _textarget: int, _texture: int, _level: int) -> void
modules/glew/glew.nanopub extern fn nl_gl3_check_framebuffer_status(_target: int) -> int
modules/glew/glew.nanopub extern fn glDepthFunc(_func: int) -> void
modules/glew/glew.nanopub extern fn glCullFace(_mode: int) -> void
modules/glew/glew.nanopub extern fn nlg_glRasterPos2f(_x: float, _y: float) -> void

glfw#

OpenGL window management and input handling via GLFW.

Source: modules/glfw/

SourcePublic or foreign declaration
modules/glfw/glfw.nanoextern fn glfwInit() -> int
modules/glfw/glfw.nanoextern fn glfwTerminate() -> void
modules/glfw/glfw.nanoextern fn glfwCreateWindow(_width: int, _height: int, _title: string, _monitor: GLFWmonitor, _share: GLFWwindow) -> GLFWwindow
modules/glfw/glfw.nanoextern fn glfwDestroyWindow(_window: GLFWwindow) -> void
modules/glfw/glfw.nanoextern fn glfwWindowShouldClose(_window: GLFWwindow) -> int
modules/glfw/glfw.nanoextern fn glfwSetWindowShouldClose(_window: GLFWwindow, _value: int) -> void
modules/glfw/glfw.nanoextern fn glfwSwapBuffers(_window: GLFWwindow) -> void
modules/glfw/glfw.nanoextern fn glfwPollEvents() -> void
modules/glfw/glfw.nanoextern fn glfwMakeContextCurrent(_window: GLFWwindow) -> void
modules/glfw/glfw.nanoextern fn glfwWindowHint(_hint: int, _value: int) -> void
modules/glfw/glfw.nanoextern fn glfwGetFramebufferSize(_window: GLFWwindow, _width_out: int, _height_out: int) -> void
modules/glfw/glfw.nanoextern fn glfwSwapInterval(_interval: int) -> void
modules/glfw/glfw.nanoextern fn glfwGetKey(_window: GLFWwindow, _key: int) -> int
modules/glfw/glfw.nanoextern fn glfwGetMouseButton(_window: GLFWwindow, _button: int) -> int
modules/glfw/glfw.nanoextern fn glfwGetCursorPos(_window: GLFWwindow, _xpos_out: int, _ypos_out: int) -> void
modules/glfw/glfw.nanoextern fn glfwGetTime() -> float
modules/glfw/glfw.nanoextern fn glfwSetTime(_time: float) -> void

glut#

OpenGL Utility Toolkit for window management (legacy, prefer GLFW).

Source: modules/glut/

SourcePublic or foreign declaration
modules/glut/glut.nanopub extern fn nl_glut_ensure_init() -> int
modules/glut/glut.nanopub extern fn nl_glut_is_initialized() -> int
modules/glut/glut.nanopub fn glut_ensure_initialized() -> bool {
modules/glut/glut.nanopub fn glut_is_initialized() -> bool {
modules/glut/glut.nanoextern fn glutInit(_argcp: int, _argv: int) -> void
modules/glut/glut.nanoextern fn glutInitDisplayMode(_mode: int) -> void
modules/glut/glut.nanoextern fn glutInitWindowSize(_width: int, _height: int) -> void
modules/glut/glut.nanoextern fn glutInitWindowPosition(_x: int, _y: int) -> void
modules/glut/glut.nanoextern fn glutCreateWindow(_title: string) -> int
modules/glut/glut.nanopub extern fn glutSolidTeapot(_size: float) -> void
modules/glut/glut.nanopub extern fn glutWireTeapot(_size: float) -> void
modules/glut/glut.nanopub extern fn glutSolidSphere(_radius: float, _slices: int, _stacks: int) -> void
modules/glut/glut.nanopub extern fn glutWireSphere(_radius: float, _slices: int, _stacks: int) -> void
modules/glut/glut.nanopub extern fn glutSolidCube(_size: float) -> void
modules/glut/glut.nanopub extern fn glutWireCube(_size: float) -> void
modules/glut/glut.nanopub extern fn glutSolidCone(_base: float, _height: float, _slices: int, _stacks: int) -> void
modules/glut/glut.nanopub extern fn glutWireCone(_base: float, _height: float, _slices: int, _stacks: int) -> void
modules/glut/glut.nanopub extern fn glutSolidTorus(_innerRadius: float, _outerRadius: float, _sides: int, _rings: int) -> void
modules/glut/glut.nanopub extern fn glutWireTorus(_innerRadius: float, _outerRadius: float, _sides: int, _rings: int) -> void
modules/glut/glut.nanopub extern fn glutSolidDodecahedron() -> void
modules/glut/glut.nanopub extern fn glutWireDodecahedron() -> void
modules/glut/glut.nanopub extern fn glutSolidOctahedron() -> void
modules/glut/glut.nanopub extern fn glutWireOctahedron() -> void
modules/glut/glut.nanopub extern fn glutSolidTetrahedron() -> void
modules/glut/glut.nanopub extern fn glutWireTetrahedron() -> void
modules/glut/glut.nanopub extern fn glutSolidIcosahedron() -> void
modules/glut/glut.nanopub extern fn glutWireIcosahedron() -> void
modules/glut/glut.nanopub extern fn glutBitmapCharacter(_font: int, _character: int) -> void
modules/glut/glut.nanoextern fn glutBitmapWidth(_font: int, _character: int) -> int
modules/glut/glut.nanopub extern fn glutBitmapLength(_font: int, _str: string) -> int
modules/glut/glut.nanoextern fn glutGet(_state: int) -> int
modules/glut/glut.nanoextern fn glutSwapBuffers() -> void
modules/glut/glut.nanoextern fn glutPostRedisplay() -> void
modules/glut/glut.nanoextern fn glutMainLoop() -> void
modules/glut/glut_helpers.nanopub fn draw_bitmap_string(font: int, text: string) -> void {
modules/glut/glut_helpers.nanopub fn get_text_width(font: int, text: string) -> int {
modules/glut/glut_helpers.nanopub fn draw_fancy_teapot(size: float, wireframe: bool) -> void {
modules/glut/glut_helpers.nanopub fn draw_sphere(radius: float, detail: int) -> void {

gpu#

No discovery manifest yet.

Source: modules/gpu/

SourcePublic or foreign declaration
modules/gpu/gpu.nanoextern fn nl_gpu_init() -> bool
modules/gpu/gpu.nanoextern fn nl_gpu_available() -> bool
modules/gpu/gpu.nanoextern fn nl_gpu_device_count() -> int
modules/gpu/gpu.nanoextern fn nl_gpu_device_info(_device: int) -> string
modules/gpu/gpu.nanoextern fn nl_gpu_sync() -> void
modules/gpu/gpu.nanoextern fn nl_gpu_alloc(_bytes: int) -> int
modules/gpu/gpu.nanoextern fn nl_gpu_free(_ptr: int) -> void
modules/gpu/gpu.nanoextern fn nl_gpu_memcpy_to_device(_dst: int, _src: array<int>, _bytes: int) -> bool
modules/gpu/gpu.nanoextern fn nl_gpu_memcpy_from_device(_dst: array<int>, _src: int, _bytes: int) -> bool
modules/gpu/gpu.nanoextern fn nl_gpu_launch(_ptx_file: string, _kernel_name: string,
modules/gpu/gpu.nanoextern fn nl_gpu_launch5(_ptx_file: string, _kernel_name: string,
modules/gpu/gpu.nanoextern fn nl_gpu_launch2d(_ptx_file: string, _kernel_name: string,
modules/gpu/gpu.nanoextern fn nl_gpu_last_error() -> string
modules/gpu/gpu.nanoextern fn nl_gpu_atomic_add(_ptr: int, _delta: int) -> int
modules/gpu/gpu.nanoextern fn nl_gpu_load(_ptr: int) -> int
modules/gpu/gpu.nanoextern fn nl_gpu_store(_ptr: int, _val: int) -> void
modules/gpu/gpu.nanoextern fn nl_gpu_load_float(_ptr: int) -> float
modules/gpu/gpu.nanoextern fn nl_gpu_store_float(_ptr: int, _val: float) -> void
modules/gpu/gpu.nanopub fn gpu_init() -> bool {
modules/gpu/gpu.nanopub fn gpu_available() -> bool {
modules/gpu/gpu.nanopub fn gpu_device_count() -> int {
modules/gpu/gpu.nanopub fn gpu_device_info(device: int) -> string {
modules/gpu/gpu.nanopub fn gpu_sync() -> void {
modules/gpu/gpu.nanopub fn gpu_alloc(bytes: int) -> int {
modules/gpu/gpu.nanopub fn gpu_free(ptr: int) -> void {
modules/gpu/gpu.nanopub fn gpu_memcpy_to_device(dst: int, src: array<int>, bytes: int) -> bool {
modules/gpu/gpu.nanopub fn gpu_memcpy_from_device(dst: array<int>, src: int, bytes: int) -> bool {
modules/gpu/gpu.nanopub fn gpu_launch(ptx_file: string, kernel_name: string,
modules/gpu/gpu.nanopub fn gpu_launch5(ptx_file: string, kernel_name: string,
modules/gpu/gpu.nanopub fn gpu_launch2d(ptx_file: string, kernel_name: string,
modules/gpu/gpu.nanopub fn gpu_atomic_add(ptr: int, delta: int) -> int {
modules/gpu/gpu.nanopub fn gpu_load(ptr: int) -> int {
modules/gpu/gpu.nanopub fn gpu_store(ptr: int, val: int) -> void {
modules/gpu/gpu.nanopub fn gpu_load_float(ptr: int) -> float {
modules/gpu/gpu.nanopub fn gpu_store_float(ptr: int, val: float) -> void {
modules/gpu/gpu.nanopub fn gpu_last_error() -> string {

http_server#

HTTP/1.1 server for serving web assets and REST APIs.

Source: modules/http_server/

SourcePublic or foreign declaration
modules/http_server/http_server.nanoextern fn nl_http_server_create(_port: int) -> HttpServer
modules/http_server/http_server.nanoextern fn nl_http_server_set_static(_server: HttpServer, _dir: string) -> void
modules/http_server/http_server.nanoextern fn nl_http_server_start(_server: HttpServer) -> int
modules/http_server/http_server.nanoextern fn nl_http_server_stop(_server: HttpServer) -> void
modules/http_server/http_server.nanoextern fn nl_http_server_free(_server: HttpServer) -> void
modules/http_server/http_server.nanoextern fn nl_http_server_add_route(_server: HttpServer, _method: string, _path: string, _handler_id: int) -> int
modules/http_server/http_server.nanoextern fn nl_http_request_method(_request: HttpRequest) -> string
modules/http_server/http_server.nanoextern fn nl_http_request_path(_request: HttpRequest) -> string
modules/http_server/http_server.nanoextern fn nl_http_request_query(_request: HttpRequest) -> string
modules/http_server/http_server.nanoextern fn nl_http_request_body(_request: HttpRequest) -> string
modules/http_server/http_server.nanoextern fn nl_http_response_status(_response: HttpResponse, _code: int, _message: string) -> void
modules/http_server/http_server.nanoextern fn nl_http_response_header(_response: HttpResponse, _name: string, _value: string) -> void
modules/http_server/http_server.nanoextern fn nl_http_response_send_json(_response: HttpResponse, _json: string) -> void
modules/http_server/http_server.nanoextern fn nl_http_response_send_html(_response: HttpResponse, _html: string) -> void
modules/http_server/http_server.nanoextern fn nl_http_response_send_text(_response: HttpResponse, _text: string) -> void
modules/http_server/http_server.nanopub fn create(port: int) -> HttpServer {
modules/http_server/http_server.nanopub fn set_static_dir(server: HttpServer, dir: string) -> void {
modules/http_server/http_server.nanopub fn start(server: HttpServer) -> int {
modules/http_server/http_server.nanopub fn stop(server: HttpServer) -> void {
modules/http_server/http_server.nanopub fn free_server(server: HttpServer) -> void {
modules/http_server/http_server.nanopub fn request_method(req: HttpRequest) -> string {
modules/http_server/http_server.nanopub fn request_path(req: HttpRequest) -> string {
modules/http_server/http_server.nanopub fn request_query(req: HttpRequest) -> string {
modules/http_server/http_server.nanopub fn request_body(req: HttpRequest) -> string {
modules/http_server/http_server.nanopub fn response_status(res: HttpResponse, code: int, message: string) -> void {
modules/http_server/http_server.nanopub fn response_header(res: HttpResponse, name: string, value: string) -> void {
modules/http_server/http_server.nanopub fn send_json(res: HttpResponse, json: string) -> void {
modules/http_server/http_server.nanopub fn send_html(res: HttpResponse, html: string) -> void {
modules/http_server/http_server.nanopub fn send_text(res: HttpResponse, text: string) -> void {
modules/http_server/http_server.nanopub fn send_ok_json(res: HttpResponse, json: string) -> void {
modules/http_server/http_server.nanopub fn send_error_json(res: HttpResponse, code: int, message: string) -> void {
modules/http_server/http_server.nanopub fn send_not_found(res: HttpResponse) -> void {

libc#

No discovery manifest yet.

Source: modules/libc/

SourcePublic or foreign declaration
modules/libc/libc.nanoextern fn nl_libc_printf(format: string) -> int
modules/libc/libc.nanoextern fn nl_libc_puts(s: string) -> int
modules/libc/libc.nanopub fn printf(format: string) -> int {
modules/libc/libc.nanopub fn puts(s: string) -> int {
modules/libc/libc.nanoextern fn nl_libc_exit(status: int) -> void
modules/libc/libc.nanoextern fn nl_libc_atoi(s: string) -> int
modules/libc/libc.nanoextern fn nl_libc_atof(s: string) -> float
modules/libc/libc.nanopub fn exit(status: int) -> void {
modules/libc/libc.nanopub fn atoi(s: string) -> int {
modules/libc/libc.nanopub fn atof(s: string) -> float {
modules/libc/libc.nanoextern fn nl_libc_strlen(s: string) -> int
modules/libc/libc.nanoextern fn nl_libc_strcmp(s1: string, s2: string) -> int
modules/libc/libc.nanopub fn strlen(s: string) -> int {
modules/libc/libc.nanopub fn strcmp(s1: string, s2: string) -> int {

math_ext#

Extended math functions: trigonometry, logarithms, rounding, and constants.

Source: modules/math_ext/

SourcePublic or foreign declaration
modules/math_ext/math_ext.nanoextern fn asin(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn acos(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn atan(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn log(_x: float) -> float # Natural logarithm (base e)
modules/math_ext/math_ext.nanoextern fn log10(_x: float) -> float # Base-10 logarithm
modules/math_ext/math_ext.nanoextern fn exp(_x: float) -> float # e^x
modules/math_ext/math_ext.nanoextern fn sinh(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn cosh(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn tanh(_x: float) -> float
modules/math_ext/math_ext.nanoextern fn fmod(_x: float, _y: float) -> float # Floating-point remainder
modules/math_ext/math_ext.nanoextern fn fabs(_x: float) -> float # Floating-point absolute value

mujoco#

MuJoCo simulation handles with body, geom, site, state, and control queries.

Source: modules/mujoco/

SourcePublic or foreign declaration
modules/mujoco/mujoco.nanopub extern fn nl_mj_available() -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_last_error() -> string
modules/mujoco/mujoco.nanopub extern fn nl_mj_version_string() -> string
modules/mujoco/mujoco.nanopub extern fn nl_mj_version() -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_load(_path: string) -> MjSim
modules/mujoco/mujoco.nanopub extern fn nl_mj_free(_sim: MjSim) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_valid(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_reset(_sim: MjSim) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_forward(_sim: MjSim) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_step(_sim: MjSim) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_step_n(_sim: MjSim, _count: int) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_time(_sim: MjSim) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_timestep(_sim: MjSim) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_set_timestep(_sim: MjSim, _dt: float) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_nq(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_nv(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_nu(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_nbody(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_ngeom(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_nsite(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_njoint(_sim: MjSim) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_id(_sim: MjSim, _name: string) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_id(_sim: MjSim, _name: string) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_site_id(_sim: MjSim, _name: string) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_joint_id(_sim: MjSim, _name: string) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_actuator_id(_sim: MjSim, _name: string) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_name(_sim: MjSim, _id: int) -> string
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_name(_sim: MjSim, _id: int) -> string
modules/mujoco/mujoco.nanopub extern fn nl_mj_joint_qpos_addr(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_joint_qvel_addr(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_qpos_addr(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_qvel_addr(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_x(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_y(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_z(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_body_quat(_sim: MjSim, _id: int, _axis: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_x(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_y(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_z(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_xmat(_sim: MjSim, _id: int, _axis: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_size(_sim: MjSim, _id: int, _axis: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_rgba(_sim: MjSim, _id: int, _axis: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_type(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_geom_body(_sim: MjSim, _id: int) -> int
modules/mujoco/mujoco.nanopub extern fn nl_mj_site_x(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_site_y(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_site_z(_sim: MjSim, _id: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_qpos(_sim: MjSim, _index: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_set_qpos(_sim: MjSim, _index: int, _value: float) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_qvel(_sim: MjSim, _index: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_set_qvel(_sim: MjSim, _index: int, _value: float) -> void
modules/mujoco/mujoco.nanopub extern fn nl_mj_ctrl(_sim: MjSim, _index: int) -> float
modules/mujoco/mujoco.nanopub extern fn nl_mj_set_ctrl(_sim: MjSim, _index: int, _value: float) -> void
modules/mujoco/mujoco.nanopub struct MjVec3 {
modules/mujoco/mujoco.nanopub struct MjQuat {
modules/mujoco/mujoco.nanopub fn mujoco_available() -> bool {
modules/mujoco/mujoco.nanopub fn mujoco_last_error() -> string {
modules/mujoco/mujoco.nanopub fn mujoco_version_string() -> string {
modules/mujoco/mujoco.nanopub fn mujoco_load(path: string) -> MjSim {
modules/mujoco/mujoco.nanopub fn mujoco_free(sim: MjSim) -> void {
modules/mujoco/mujoco.nanopub fn mujoco_valid(sim: MjSim) -> bool {
modules/mujoco/mujoco.nanopub fn mujoco_step_seconds(sim: MjSim, seconds: float) -> void {
modules/mujoco/mujoco.nanopub fn mujoco_body_pos(sim: MjSim, id: int) -> MjVec3 {
modules/mujoco/mujoco.nanopub fn mujoco_geom_pos(sim: MjSim, id: int) -> MjVec3 {
modules/mujoco/mujoco.nanopub fn mujoco_site_pos(sim: MjSim, id: int) -> MjVec3 {
modules/mujoco/mujoco.nanopub fn mujoco_body_quat(sim: MjSim, id: int) -> MjQuat {
modules/mujoco/mujoco.nanopub fn mujoco_set_ctrl_clamped(sim: MjSim, index: int, value: float, lo: float, hi: float) -> void {
modules/mujoco/mujoco.nanopub fn mujoco_geom_is_sphere(sim: MjSim, id: int) -> bool {
modules/mujoco/mujoco.nanopub fn mujoco_geom_is_box(sim: MjSim, id: int) -> bool {

nano_eval#

Persistent NanoLang tree-walker session with editor host primitives.

Source: modules/nano_eval/

SourcePublic or foreign declaration
modules/nano_eval/nano_eval.nanoextern fn nano_eval_create() -> int
modules/nano_eval/nano_eval.nanoextern fn nano_eval_destroy(_session: int) -> void
modules/nano_eval/nano_eval.nanoextern fn nano_eval_string(_session: int, _source: string) -> string
modules/nano_eval/nano_eval.nanoextern fn nano_eval_error(_session: int) -> string
modules/nano_eval/nano_eval.nanoextern fn nano_eval_bind_buffer(_session: int, _text: string, _point: int) -> void
modules/nano_eval/nano_eval.nanoextern fn nano_eval_buffer(_session: int) -> string
modules/nano_eval/nano_eval.nanoextern fn nano_eval_point(_session: int) -> int
modules/nano_eval/nano_eval.nanoextern fn nano_eval_cmd_count(_session: int) -> int
modules/nano_eval/nano_eval.nanoextern fn nano_eval_cmd_kind(_session: int, _index: int) -> int
modules/nano_eval/nano_eval.nanoextern fn nano_eval_cmd_arg(_session: int, _index: int) -> string
modules/nano_eval/nano_eval.nanoextern fn nano_eval_cmd_clear(_session: int) -> void
modules/nano_eval/nano_eval.nanoextern fn nano_eval_freeze(_source: string, _point: int) -> string

nano_highlight#

NanoLang syntax highlighting and HTML formatting.

Source: modules/nano_highlight/

SourcePublic or foreign declaration
modules/nano_highlight/nano_highlight.nanopub fn highlight_html(code: string) -> string {
modules/nano_highlight/nano_highlight.nanopub fn highlight_ansi(code: string) -> string {

nano_tools#

Tooling helpers for linting and syntax checks.

Source: modules/nano_tools/

SourcePublic or foreign declaration
modules/nano_tools/nano_tools.nanoextern fn eval(_source: string) -> int
modules/nano_tools/nano_tools.nanopub fn lint_source(source: string, file_name: string) -> List<CompilerDiagnostic> {
modules/nano_tools/nano_tools.nanopub fn syntax_check_source(source: string, file_name: string) -> List<CompilerDiagnostic> {
modules/nano_tools/nano_tools.nanopub fn lint_file(path: string) -> List<CompilerDiagnostic> {
modules/nano_tools/nano_tools.nanopub fn syntax_check_file(path: string) -> List<CompilerDiagnostic> {
modules/nano_tools/nano_tools.nanopub fn lint_format(diags: List<CompilerDiagnostic>, source: string) -> string {
modules/nano_tools/nano_tools.nanopub fn pretty_print_html(source: string) -> string {
modules/nano_tools/nano_tools.nanopub fn pretty_print_ansi(source: string) -> string {

nanoisa#

I read and write .nvm modules and print canonical or detailed NanoISA assembly.

Source: modules/nanoisa/

SourcePublic or foreign declaration
modules/nanoisa/nanoisa.nanoextern fn nl_nanoisa_load_print(_path: string) -> string
modules/nanoisa/nanoisa.nanoextern fn nl_nanoisa_load_pretty(_path: string) -> string
modules/nanoisa/nanoisa.nanoextern fn nl_nanoisa_assemble_save(_nasm_path: string, _nvm_path: string) -> int
modules/nanoisa/nanoisa.nanoextern fn nl_nanoisa_assemble_text_save(_source: string, _path: string) -> int
modules/nanoisa/nanoisa.nanoextern fn nl_nanoisa_last_error() -> string
modules/nanoisa/nanoisa.nanopub fn load_print(path: string) -> string {
modules/nanoisa/nanoisa.nanopub fn load_pretty(path: string) -> string {
modules/nanoisa/nanoisa.nanopub fn assemble_save(nasm_path: string, nvm_path: string) -> int {
modules/nanoisa/nanoisa.nanopub fn assemble_text_save(source: string, path: string) -> int {
modules/nanoisa/nanoisa.nanopub fn last_error() -> string {

ncurses#

Terminal UI with colors, cursor control, and keyboard input.

Source: modules/ncurses/

SourcePublic or foreign declaration
modules/ncurses/ncurses.nanoextern fn initscr_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn endwin_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn curs_set_wrapper(_visibility: int) -> int
modules/ncurses/ncurses.nanoextern fn clear_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn refresh_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn erase_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn move_wrapper(_y: int, _x: int) -> int
modules/ncurses/ncurses.nanoextern fn mvprintw_wrapper(_y: int, _x: int, _str: string) -> int
modules/ncurses/ncurses.nanoextern fn mvaddch_wrapper(_y: int, _x: int, _ch: int) -> int
modules/ncurses/ncurses.nanoextern fn mvaddstr_wrapper(_y: int, _x: int, _str: string) -> int
modules/ncurses/ncurses.nanoextern fn addch_wrapper(_ch: int) -> int
modules/ncurses/ncurses.nanoextern fn addstr_wrapper(_str: string) -> int
modules/ncurses/ncurses.nanoextern fn getch_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn nl_nodelay(_win: int, _bf: int) -> int
modules/ncurses/ncurses.nanoextern fn nl_keypad(_win: int, _bf: int) -> int
modules/ncurses/ncurses.nanoextern fn timeout_wrapper(_delay: int) -> void
modules/ncurses/ncurses.nanoextern fn start_color_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn has_colors_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn init_pair_wrapper(_pair: int, _fg: int, _bg: int) -> int
modules/ncurses/ncurses.nanoextern fn attron_wrapper(_attrs: int) -> int
modules/ncurses/ncurses.nanoextern fn attroff_wrapper(_attrs: int) -> int
modules/ncurses/ncurses.nanoextern fn getmaxx_wrapper(_win: int) -> int
modules/ncurses/ncurses.nanoextern fn getmaxy_wrapper(_win: int) -> int
modules/ncurses/ncurses.nanoextern fn stdscr_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn noecho_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn echo_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn cbreak_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn nocbreak_wrapper() -> int
modules/ncurses/ncurses.nanoextern fn box_wrapper(_win: int, _verch: int, _horch: int) -> int

openai#

OpenAI-compatible API client for chat completions, embeddings, and LLM interactions.

Source: modules/openai/

SourcePublic or foreign declaration
modules/openai/openai.nanoextern fn nl_openai_set_api_base(_base_url: string) -> void
modules/openai/openai.nanoextern fn nl_openai_get_api_base() -> string
modules/openai/openai.nanoextern fn nl_openai_get_key_from_env() -> string
modules/openai/openai.nanoextern fn nl_openai_chat_completion(_model: string, _messages_json: string, _api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_chat_completion_simple(_model: string, _system_prompt: string, _user_message: string, _api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_chat_completion_with_temperature(_model: string, _messages_json: string, _temperature: float, _max_tokens: int, _api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_create_embedding(_model: string, _input: string, _api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_list_models(_api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_get_model(_model_id: string, _api_key: string) -> string
modules/openai/openai.nanoextern fn nl_openai_count_tokens_estimate(_text: string) -> int
modules/openai/openai.nanopub fn openai_set_api_base(base_url: string) -> void {
modules/openai/openai.nanopub fn openai_get_api_base() -> string {
modules/openai/openai.nanopub fn openai_get_key_from_env() -> string {
modules/openai/openai.nanopub fn openai_chat_completion(model: string, messages_json: string, api_key: string) -> string {
modules/openai/openai.nanopub fn openai_chat_completion_simple(model: string, system_prompt: string, user_message: string, api_key: string) -> string {
modules/openai/openai.nanopub fn openai_chat_completion_with_temperature(model: string, messages_json: string, temperature: float, max_tokens: int, api_key: string) -> string {
modules/openai/openai.nanopub fn openai_create_embedding(model: string, input: string, api_key: string) -> string {
modules/openai/openai.nanopub fn openai_list_models(api_key: string) -> string {
modules/openai/openai.nanopub fn openai_get_model(model_id: string, api_key: string) -> string {
modules/openai/openai.nanopub fn openai_count_tokens_estimate(text: string) -> int {

opengl#

OpenGL graphics API bindings for 3D rendering.

Source: modules/opengl/

SourcePublic or foreign declaration
modules/opengl/opengl.nanopub fn glClearColor(r: float, g: float, b: float, a: float) -> void {
modules/opengl/opengl.nanopub fn glVertex2f(x: float, y: float) -> void {
modules/opengl/opengl.nanopub fn glVertex3f(x: float, y: float, z: float) -> void {
modules/opengl/opengl.nanopub fn glColor3f(r: float, g: float, b: float) -> void {
modules/opengl/opengl.nanopub fn glColor4f(r: float, g: float, b: float, a: float) -> void {
modules/opengl/opengl.nanopub fn glTranslatef(x: float, y: float, z: float) -> void {
modules/opengl/opengl.nanopub fn glRotatef(angle: float, x: float, y: float, z: float) -> void {
modules/opengl/opengl.nanopub fn glScalef(x: float, y: float, z: float) -> void {
modules/opengl/opengl.nanopub fn glLineWidth(width: float) -> void {
modules/opengl/opengl.nanopub fn glPointSize(size: float) -> void {
modules/opengl/opengl.nanopub fn glNormal3f(nx: float, ny: float, nz: float) -> void {
modules/opengl/opengl.nanopub fn glRasterPos2f(x: float, y: float) -> void {
modules/opengl/opengl.nanopub fn glMaterialf(face: int, pname: int, param: float) -> void {

preferences#

Configuration and settings storage for applications.

Source: modules/preferences/

SourcePublic or foreign declaration
modules/preferences/preferences.nanoextern fn nl_prefs_save_playlist(_filename: string, _items: array<string>, _count: int) -> int
modules/preferences/preferences.nanoextern fn nl_prefs_load_playlist(_filename: string) -> array<string>
modules/preferences/preferences.nanoextern fn nl_prefs_get_home() -> string
modules/preferences/preferences.nanoextern fn nl_prefs_get_path(_app_name: string) -> string

proptest#

Property-based testing helpers for NanoLang programs.

Source: modules/proptest/

SourcePublic or foreign declaration
modules/proptest/proptest.nanopub struct RunConfig {
modules/proptest/proptest.nanopub struct PropertyReport {
modules/proptest/proptest.nanopub fn prop_pass() -> string {
modules/proptest/proptest.nanopub fn prop_fail(message: string) -> string {
modules/proptest/proptest.nanopub fn prop_discard(reason: string) -> string {
modules/proptest/proptest.nanopub struct IntRangeGenerator {
modules/proptest/proptest.nanopub struct IntPairGenerator {
modules/proptest/proptest.nanopub struct IntArrayGenerator {
modules/proptest/proptest.nanopub fn config_default() -> RunConfig {
modules/proptest/proptest.nanopub fn config(trials: int, max_shrink_steps: int, discard_limit: int, seed: int) -> RunConfig {
modules/proptest/proptest.nanopub fn int_range(min_value: int, max_value: int) -> IntRangeGenerator {
modules/proptest/proptest.nanopub fn int_pair(first: IntRangeGenerator, second: IntRangeGenerator) -> IntPairGenerator {
modules/proptest/proptest.nanopub fn int_array(element: IntRangeGenerator, max_length: int) -> IntArrayGenerator {
modules/proptest/proptest.nanopub fn report_passed(report: PropertyReport) -> bool {
modules/proptest/proptest.nanopub fn report_summary(report: PropertyReport) -> string {
modules/proptest/proptest.nanopub fn forall_int(name: string, generator: IntRangeGenerator, property: fn(int) -> string) -> PropertyReport {
modules/proptest/proptest.nanopub fn forall_int_with_config(name: string, generator: IntRangeGenerator, property: fn(int) -> string, cfg: RunConfig) -> PropertyReport {
modules/proptest/proptest.nanopub fn forall_int_pair(name: string, generator: IntPairGenerator, property: fn(int, int) -> string) -> PropertyReport {
modules/proptest/proptest.nanopub fn forall_int_pair_with_config(name: string, generator: IntPairGenerator, property: fn(int, int) -> string, cfg: RunConfig) -> PropertyReport {
modules/proptest/proptest.nanopub fn forall_int_array(name: string, generator: IntArrayGenerator, property: fn(array<int>) -> string) -> PropertyReport {
modules/proptest/proptest.nanopub fn forall_int_array_with_config(name: string, generator: IntArrayGenerator, property: fn(array<int>) -> string, cfg: RunConfig) -> PropertyReport {

pt2_audio#

ProTracker 2 audio engine for MOD file playback.

Source: modules/pt2_audio/

SourcePublic or foreign declaration
modules/pt2_audio/pt2_audio.nanoextern fn pt2_audio_init(_sample_rate: int) -> int
modules/pt2_audio/pt2_audio.nanoextern fn pt2_audio_load_mod(_filename: string) -> int
modules/pt2_audio/pt2_audio.nanoextern fn pt2_audio_play() -> void
modules/pt2_audio/pt2_audio.nanoextern fn pt2_audio_stop() -> void
modules/pt2_audio/pt2_audio.nanoextern fn pt2_audio_is_playing() -> int

pt2_module#

ProTracker 2 MOD file loader and parser.

Source: modules/pt2_module/

SourcePublic or foreign declaration
modules/pt2_module/pt2_module.nanoextern fn pt2_module_load(_filename: string) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_name() -> string
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_song_length() -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_pattern_count() -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_pattern_table(_position: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_sample_length(_sample_num: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_sample_volume(_sample_num: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_sample_name(_sample_num: int) -> string
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_note_period(_pattern: int, _row: int, _channel: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_note_sample(_pattern: int, _row: int, _channel: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_note_command(_pattern: int, _row: int, _channel: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_get_note_param(_pattern: int, _row: int, _channel: int) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_save(_filename: string) -> int
modules/pt2_module/pt2_module.nanoextern fn pt2_module_free() -> void

pt2_state#

ProTracker 2 state management for tracker UI.

Source: modules/pt2_state/

SourcePublic or foreign declaration
modules/pt2_state/pt2_state.nanoextern fn pt2_init_state() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_start_playback() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_stop_playback() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_is_playing() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_current_row() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_current_pattern() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_speed() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_bpm() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_tick() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_get_song_pos() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_current_row(_row: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_current_pattern(_pattern: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_speed(_speed: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_bpm(_bpm: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_tick(_tick: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_song_pos(_pos: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_set_channel_period(_channel: int, _period: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_channel_period(_channel: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_channel_volume(_channel: int, _volume: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_channel_volume(_channel: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_channel_sample(_channel: int, _sample: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_channel_sample(_channel: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_channel_note(_channel: int, _note: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_channel_note(_channel: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_pattern_table_entry(_pos: int, _pattern: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_pattern_table_entry(_pos: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_song_length(_length: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_song_length() -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_sample_length(_sample: int, _length: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_sample_length(_sample: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_sample_volume(_sample: int, _volume: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_sample_volume(_sample: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_sample_loop_start(_sample: int, _start: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_sample_loop_start(_sample: int) -> int
modules/pt2_state/pt2_state.nanoextern fn pt2_set_sample_loop_length(_sample: int, _length: int) -> void
modules/pt2_state/pt2_state.nanoextern fn pt2_get_sample_loop_length(_sample: int) -> int

pty#

POSIX pseudo-terminal bindings — open a PTY, fork a subprocess, relay its I/O.

Source: modules/pty/

SourcePublic or foreign declaration
modules/pty/pty.nanoextern fn nl_pty_open(_rows: int, _cols: int) -> int
modules/pty/pty.nanoextern fn nl_pty_fork_exec(_master_fd: int, _prog: string, _args_str: string, _envkey: string, _envval: string) -> int
modules/pty/pty.nanoextern fn nl_pty_read(_master_fd: int) -> string
modules/pty/pty.nanoextern fn nl_pty_write(_master_fd: int, _data: string) -> int
modules/pty/pty.nanoextern fn nl_pty_resize(_master_fd: int, _pid: int, _rows: int, _cols: int) -> void
modules/pty/pty.nanoextern fn nl_pty_close(_master_fd: int) -> void
modules/pty/pty.nanoextern fn nl_pty_is_alive(_pid: int) -> int

pybridge#

Bridge to Python via a helper process with JSON-RPC messaging.

Source: modules/pybridge/

SourcePublic or foreign declaration
modules/pybridge/pybridge.nanoextern fn nl_pybridge_init(_requirements_json: string, _privileged: int) -> int
modules/pybridge/pybridge.nanoextern fn nl_pybridge_import(_module: string) -> int
modules/pybridge/pybridge.nanoextern fn nl_pybridge_call(_handle: int, _method: string, _args_json: string, _kwargs_json: string) -> string
modules/pybridge/pybridge.nanoextern fn nl_pybridge_get(_handle: int, _attr: string) -> string
modules/pybridge/pybridge.nanoextern fn nl_pybridge_set(_handle: int, _attr: string, _value_json: string) -> int
modules/pybridge/pybridge.nanoextern fn nl_pybridge_release(_handle: int) -> int
modules/pybridge/pybridge.nanoextern fn nl_pybridge_ping() -> string
modules/pybridge/pybridge.nanoextern fn nl_pybridge_sysinfo() -> string
modules/pybridge/pybridge.nanoextern fn nl_pybridge_deps() -> string
modules/pybridge/pybridge.nanoextern fn nl_pybridge_shutdown() -> void
modules/pybridge/pybridge.nanopub fn pybridge_init(requirements: array<string>, privileged: bool) -> bool {
modules/pybridge/pybridge.nanopub fn pybridge_import(module_name: string) -> int {
modules/pybridge/pybridge.nanopub fn pybridge_call(mod_handle: int, method: string, args_json: string, kwargs_json: string) -> string {
modules/pybridge/pybridge.nanopub fn pybridge_get(mod_handle: int, attr: string) -> string {
modules/pybridge/pybridge.nanopub fn pybridge_set(mod_handle: int, attr: string, value_json: string) -> bool {
modules/pybridge/pybridge.nanopub fn pybridge_release(mod_handle: int) -> bool {
modules/pybridge/pybridge.nanopub fn pybridge_ping() -> string {
modules/pybridge/pybridge.nanopub fn pybridge_sysinfo() -> string {
modules/pybridge/pybridge.nanopub fn pybridge_deps() -> string {
modules/pybridge/pybridge.nanopub fn pybridge_shutdown() -> void {

pybridge_matplotlib#

Matplotlib renderer adapter using the pybridge helper process.

Source: modules/pybridge_matplotlib/

SourcePublic or foreign declaration
modules/pybridge_matplotlib/pybridge_matplotlib.nanoextern fn mpl_init(_privileged: int) -> int
modules/pybridge_matplotlib/pybridge_matplotlib.nanoextern fn mpl_render_png(_spec_json: string, _inline: int) -> string
modules/pybridge_matplotlib/pybridge_matplotlib.nanoextern fn mpl_shutdown() -> void

pybridge_warp#

GPU-accelerated 2D fluid simulation using NVIDIA Warp via the pybridge helper process.

Source: modules/pybridge_warp/

SourcePublic or foreign declaration
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_init(_n: int, _device: string) -> int
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_step(_handle: int, _dt: float, _iters: int) -> void
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_splat(_handle: int, _cx: int, _cy: int, _fx: float, _fy: float, _radius: int, _amount: float) -> void
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_get_image_png(_handle: int, _path: string) -> int
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_reset(_handle: int) -> void
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_destroy(_handle: int) -> void
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_shutdown() -> void
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_backend() -> string
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_last_error() -> string
modules/pybridge_warp/pybridge_warp.nanoextern fn warp_fluid_last_backend() -> string

readline#

Interactive line editing with history, completion, and Emacs/vi key bindings.

Source: modules/readline/

SourcePublic or foreign declaration
modules/readline/readline.nanoextern fn rl_readline_wrapper(_prompt: string) -> string
modules/readline/readline.nanoextern fn rl_hit_eof_wrapper() -> int
modules/readline/readline.nanoextern fn rl_raw_getline_wrapper(_prompt: string) -> string
modules/readline/readline.nanoextern fn rl_add_history_wrapper(_line: string) -> void
modules/readline/readline.nanoextern fn rl_clear_history_wrapper() -> void
modules/readline/readline.nanoextern fn rl_history_length_wrapper() -> int
modules/readline/readline.nanoextern fn rl_history_get_wrapper(_index: int) -> string
modules/readline/readline.nanoextern fn rl_initialize_wrapper() -> int
modules/readline/readline.nanoextern fn rl_cleanup_wrapper() -> void
modules/readline/readline.nanoextern fn rl_input_available_wrapper() -> int
modules/readline/readline.nanoextern fn rl_set_prompt_wrapper(_prompt: string) -> void
modules/readline/readline.nanoextern fn rl_read_history_wrapper(_filename: string) -> int
modules/readline/readline.nanoextern fn rl_write_history_wrapper(_filename: string) -> int
modules/readline/readline.nanoextern fn rl_stifle_history_wrapper(_max_entries: int) -> void
modules/readline/readline.nanoextern fn rl_append_history_wrapper(_nelements: int, _filename: string) -> int
modules/readline/readline.nanopub fn rl_readline(prompt: string) -> string {
modules/readline/readline.nanopub fn rl_hit_eof() -> bool {
modules/readline/readline.nanopub fn rl_raw_getline(prompt: string) -> string {
modules/readline/readline.nanopub fn rl_add_history(line: string) -> void {
modules/readline/readline.nanopub fn rl_clear_history() -> void {
modules/readline/readline.nanopub fn rl_history_length() -> int {
modules/readline/readline.nanopub fn rl_history_get(index: int) -> string {
modules/readline/readline.nanopub fn rl_initialize() -> int {
modules/readline/readline.nanopub fn rl_cleanup() -> void {
modules/readline/readline.nanopub fn rl_read_history(filename: string) -> int {
modules/readline/readline.nanopub fn rl_write_history(filename: string) -> int {
modules/readline/readline.nanopub fn rl_stifle_history(max_entries: int) -> void {
modules/readline/readline.nanopub fn rl_append_history(nelements: int, filename: string) -> int {
modules/readline/readline.nanopub fn rl_has_input() -> bool {

sdl#

Windowed 2D graphics, input, and audio via SDL2 library.

Source: modules/sdl/

SourcePublic or foreign declaration
modules/sdl/sdl.nanoextern fn SDL_Init(_flags: int) -> int
modules/sdl/sdl.nanoextern fn SDL_Quit() -> void
modules/sdl/sdl.nanoextern fn SDL_GetError() -> string
modules/sdl/sdl.nanoextern fn SDL_GetTicks() -> int
modules/sdl/sdl.nanoextern fn SDL_Delay(_ms: int) -> void
modules/sdl/sdl.nanoextern fn SDL_CreateWindow(_title: string, _x: int, _y: int, _w: int, _h: int, _flags: int) -> SDL_Window
modules/sdl/sdl.nanoextern fn SDL_DestroyWindow(_window: SDL_Window) -> void
modules/sdl/sdl.nanoextern fn SDL_SetWindowTitle(_window: SDL_Window, _title: string) -> void
modules/sdl/sdl.nanoextern fn SDL_SetWindowSize(_window: SDL_Window, _w: int, _h: int) -> void
modules/sdl/sdl.nanoextern fn SDL_GetWindowSize(_window: SDL_Window, _w_ptr: int, _h_ptr: int) -> void
modules/sdl/sdl.nanoextern fn SDL_GL_SetAttribute(_attr: int, _value: int) -> int
modules/sdl/sdl.nanoextern fn SDL_GL_CreateContext(_window: SDL_Window) -> SDL_GLContext
modules/sdl/sdl.nanoextern fn SDL_GL_MakeCurrent(_window: SDL_Window, _context: SDL_GLContext) -> int
modules/sdl/sdl.nanoextern fn SDL_GL_SetSwapInterval(_interval: int) -> int
modules/sdl/sdl.nanoextern fn SDL_GL_SwapWindow(_window: SDL_Window) -> void
modules/sdl/sdl.nanoextern fn SDL_GL_DeleteContext(_context: SDL_GLContext) -> void
modules/sdl/sdl.nanoextern fn SDL_CreateRenderer(_window: SDL_Window, _index: int, _flags: int) -> SDL_Renderer
modules/sdl/sdl.nanoextern fn SDL_DestroyRenderer(_renderer: SDL_Renderer) -> void
modules/sdl/sdl.nanoextern fn SDL_RenderClear(_renderer: SDL_Renderer) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderPresent(_renderer: SDL_Renderer) -> void
modules/sdl/sdl.nanoextern fn SDL_RenderSetLogicalSize(_renderer: SDL_Renderer, _w: int, _h: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderSetScale(_renderer: SDL_Renderer, _scale_x: float, _scale_y: float) -> int
modules/sdl/sdl.nanoextern fn SDL_SetRenderDrawColor(_renderer: SDL_Renderer, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderFillRect(_renderer: SDL_Renderer, _rect_ptr: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderDrawPoint(_renderer: SDL_Renderer, _x: int, _y: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderDrawLine(_renderer: SDL_Renderer, _x1: int, _y1: int, _x2: int, _y2: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderDrawRect(_renderer: SDL_Renderer, _rect_ptr: int) -> int
modules/sdl/sdl.nanoextern fn SDL_SetRenderDrawBlendMode(_renderer: SDL_Renderer, _mode: int) -> int
modules/sdl/sdl.nanoextern fn SDL_RenderCopy(_renderer: SDL_Renderer, _texture: SDL_Texture, _srcrect: int, _dstrect: int) -> int
modules/sdl/sdl.nanoextern fn SDL_CreateTexture(_renderer: SDL_Renderer, _format: int, _access: int, _w: int, _h: int) -> SDL_Texture
modules/sdl/sdl.nanoextern fn SDL_UpdateTexture(_texture: SDL_Texture, _rect: int, _pixels: int, _pitch: int) -> int
modules/sdl/sdl.nanoextern fn SDL_SetTextureBlendMode(_texture: SDL_Texture, _mode: int) -> int
modules/sdl/sdl.nanoextern fn SDL_SetTextureAlphaMod(_texture: SDL_Texture, _alpha: int) -> int
modules/sdl/sdl.nanoextern fn SDL_QueryTexture(_texture: SDL_Texture, _format: int, _access: int, _w: int, _h: int) -> int
modules/sdl/sdl.nanoextern fn SDL_CreateTextureFromSurface(_renderer: SDL_Renderer, _surface: SDL_Surface) -> SDL_Texture
modules/sdl/sdl.nanoextern fn SDL_DestroyTexture(_texture: SDL_Texture) -> void
modules/sdl/sdl.nanoextern fn SDL_FreeSurface(_surface: SDL_Surface) -> void
modules/sdl/sdl.nanoextern fn SDL_PollEvent(_event_ptr: int) -> int
modules/sdl/sdl.nanoextern fn SDL_EventState(_type: int, _state: int) -> int
modules/sdl/sdl.nanoextern fn SDL_SetHint(_name: string, _value: string) -> int

sdl_helpers#

SDL utility functions for common tasks (drawing, input polling, font loading).

Source: modules/sdl_helpers/

SourcePublic or foreign declaration
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_render_fill_rect(_renderer: SDL_Renderer, _x: int, _y: int, _w: int, _h: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_update_texture(_texture: SDL_Texture, _pixels: array<int>, _width: int, _height: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_render_texture(_renderer: SDL_Renderer, _texture: SDL_Texture, _x: int, _y: int, _w: int, _h: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_event_quit() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_mouse_click() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_mouse_state() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_get_mouse_pos() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_mouse_up() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_mouse_motion() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_keypress() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_mod_ctrl() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_mod_meta() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_mouse_wheel() -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_key_state(_scancode: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_render_text_solid(_renderer: SDL_Renderer, _font: int, _text: string, _x: int, _y: int, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_render_text_blended(_renderer: SDL_Renderer, _font: int, _text: string, _x: int, _y: int, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_save_bmp(_renderer: SDL_Renderer, _w: int, _h: int, _path: string) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_save_png(_renderer: SDL_Renderer, _w: int, _h: int, _path: string) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_system(_cmd: string) -> int
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_flush_stdout() -> void
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_start_text_input() -> void
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_stop_text_input() -> void
modules/sdl_helpers/sdl_helpers.nanoextern fn nl_sdl_poll_text_input() -> string

sdl_image#

SDL_image - Load PNG, JPG, and other image formats into SDL textures.

Source: modules/sdl_image/

SourcePublic or foreign declaration
modules/sdl_image/sdl_image.nanopub extern fn IMG_Init(_flags: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_Quit() -> void
modules/sdl_image/sdl_image.nanopub extern fn IMG_Linked_Version() -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_Load(_file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadTexture(_renderer: SDL_Renderer, _file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_Load_RW(_src: int, _freesrc: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadPNG_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadJPG_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadBMP_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadGIF_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadTGA_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadPCX_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadTIF_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadWEBP_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadXPM_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadXV_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadTexture_RW(_renderer: SDL_Renderer, _src: int, _freesrc: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadTextureTyped_RW(_renderer: SDL_Renderer, _src: int, _freesrc: int, _type: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isPNG(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isJPG(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isBMP(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isGIF(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isTIF(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isPCX(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isPNM(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isSVG(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isTGA(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isWEBP(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isXPM(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isXV(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isICO(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_isCUR(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_SavePNG(_surface: int, _file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_SavePNG_RW(_surface: int, _dst: int, _freedst: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_SaveJPG(_surface: int, _file: string, _quality: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_SaveJPG_RW(_surface: int, _dst: int, _freedst: int, _quality: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadAnimation(_file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadAnimation_RW(_src: int, _freesrc: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadAnimationTyped_RW(_src: int, _freesrc: int, _type: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadGIFAnimation_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_LoadWEBPAnimation_RW(_src: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn IMG_FreeAnimation(_anim: int) -> void
modules/sdl_image/sdl_image.nanopub extern fn IMG_GetError() -> string
modules/sdl_image/sdl_image.nanopub extern fn IMG_SetError(_fmt: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_load_png_texture(_renderer: SDL_Renderer, _file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_load_texture(_renderer: SDL_Renderer, _file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_render_texture(_renderer: SDL_Renderer, _texture: int, _x: int, _y: int, _w: int, _h: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_render_texture_ex(_renderer: SDL_Renderer, _texture: int, _x: int, _y: int, _w: int, _h: int, _angle: float, _flip: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_render_texture_sprite(_renderer: SDL_Renderer, _texture: int, _src_x: int, _src_y: int, _src_w: int, _src_h: int, _dst_x: int, _dst_y: int, _dst_w: int, _dst_h: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_get_texture_size(_texture: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_get_texture_width(_texture: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_get_texture_height(_texture: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_set_texture_alpha(_texture: int, _alpha: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_set_texture_color(_texture: int, _r: int, _g: int, _b: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_set_texture_blend_mode(_texture: int, _blend: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_create_texture_from_pixels(_renderer: SDL_Renderer, _width: int, _height: int, _pixels: int) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_load_icon_batch(_renderer: SDL_Renderer, _files: array<string>, _count: int) -> array<int>
modules/sdl_image/sdl_image.nanopub extern fn nl_img_destroy_texture(_texture: int) -> void
modules/sdl_image/sdl_image.nanopub extern fn nl_img_destroy_texture_batch(_textures: array<int>, _count: int) -> void
modules/sdl_image/sdl_image.nanopub extern fn nl_img_can_load(_file: string) -> int
modules/sdl_image/sdl_image.nanopub extern fn nl_img_get_supported_formats() -> array<string>
modules/sdl_image/sdl_image_safe.nanopub fn img_load_texture(renderer: SDL_Renderer, file: string) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_load_png_texture(renderer: SDL_Renderer, file: string) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_render_texture(renderer: SDL_Renderer, texture: int, x: int, y: int, w: int, h: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_render_texture_ex(renderer: SDL_Renderer, texture: int, x: int, y: int, w: int, h: int, angle: float, flip: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_render_sprite(renderer: SDL_Renderer, texture: int, src_x: int, src_y: int, src_w: int, src_h: int, dst_x: int, dst_y: int, dst_w: int, dst_h: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_get_width(texture: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_get_height(texture: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_set_alpha(texture: int, alpha: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_set_color(texture: int, r: int, g: int, b: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_set_blend_mode(texture: int, blend: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_destroy(texture: int) -> void {
modules/sdl_image/sdl_image_safe.nanopub fn img_init(flags: int) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_quit() -> void {
modules/sdl_image/sdl_image_safe.nanopub fn img_load_texture_direct(renderer: SDL_Renderer, file: string) -> int {
modules/sdl_image/sdl_image_safe.nanopub fn img_get_error() -> string {

sdl_mixer#

SDL audio mixing for music and sound effects.

Source: modules/sdl_mixer/

SourcePublic or foreign declaration
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_Init(_flags: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_Quit() -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_OpenAudio(_frequency: int, _format: int, _channels: int, _chunksize: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_CloseAudio() -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_AllocateChannels(_numchans: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_LoadWAV(_file: string) -> Mix_Chunk
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FreeChunk(_chunk: Mix_Chunk) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PlayChannel(_channel: int, _chunk: Mix_Chunk, _loops: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PlayChannelTimed(_channel: int, _chunk: Mix_Chunk, _loops: int, _ticks: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FadeInChannel(_channel: int, _chunk: Mix_Chunk, _loops: int, _ms: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_HaltChannel(_channel: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FadeOutChannel(_channel: int, _ms: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_Volume(_channel: int, _volume: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_VolumeChunk(_chunk: Mix_Chunk, _volume: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_LoadMUS(_file: string) -> Mix_Music
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FreeMusic(_music: Mix_Music) -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PlayMusic(_music: Mix_Music, _loops: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FadeInMusic(_music: Mix_Music, _loops: int, _ms: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FadeInMusicPos(_music: Mix_Music, _loops: int, _ms: int, _position: float) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_HaltMusic() -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_FadeOutMusic(_ms: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_RewindMusic() -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PauseMusic() -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_ResumeMusic() -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_VolumeMusic(_volume: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_Playing(_channel: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_Paused(_channel: int) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PlayingMusic() -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_PausedMusic() -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn nl_mix_set_post_mix(_callback: fn(Mix_UserData, Mix_AudioBuffer, int) -> void, _arg: Mix_UserData) -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn nl_mix_clear_post_mix() -> void
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_GetNumChannels() -> int
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_GetError() -> string
modules/sdl_mixer/sdl_mixer.nanoextern fn Mix_ClearError() -> int

sdl_term#

SDL2 terminal emulator — embed a VT100-compatible terminal in any SDL window.

Source: modules/sdl_term/

SourcePublic or foreign declaration
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_create(_font_path: string, _pt_size: int, _rows: int, _cols: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_feed(_handle: int, _data: string) -> void
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_render(_handle: int, _renderer: SDL_Renderer, _x: int, _y: int) -> void
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_mark_clean(_handle: int) -> void
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_resize(_handle: int, _rows: int, _cols: int) -> void
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_cursor_col(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_cursor_row(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_cell_w(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_cell_h(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_pixel_w(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_pixel_h(_handle: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_destroy(_handle: int) -> void
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_key_to_seq(_keycode: int, _mod: int, _buf: string, _buf_len: int) -> int
modules/sdl_term/sdl_term.nanoextern fn nl_sdl_term_key_seq_str() -> string

sdl_ttf#

SDL TrueType font rendering via SDL2_ttf.

Source: modules/sdl_ttf/

SourcePublic or foreign declaration
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_Init() -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_Quit() -> void
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_WasInit() -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_OpenFont(_file: string, _ptsize: int) -> TTF_Font
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_CloseFont(_font: TTF_Font) -> void
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_RenderText_Solid(_font: TTF_Font, _text: string, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_RenderText_Blended(_font: TTF_Font, _text: string, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_RenderText_Shaded(_font: TTF_Font, _text: string, _fg_r: int, _fg_g: int, _fg_b: int, _fg_a: int, _bg_r: int, _bg_g: int, _bg_b: int, _bg_a: int) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_FontHeight(_font: TTF_Font) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_FontAscent(_font: TTF_Font) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_FontDescent(_font: TTF_Font) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_FontLineSkip(_font: TTF_Font) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_SizeText(_font: TTF_Font, _text: string, _w_out: int, _h_out: int) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_GetFontStyle(_font: TTF_Font) -> int
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_SetFontStyle(_font: TTF_Font, _style: int) -> void
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_GetError() -> string
modules/sdl_ttf/sdl_ttf.nanoextern fn TTF_ClearError() -> void
modules/sdl_ttf/sdl_ttf_helpers.nanoextern fn nl_render_text_blended_to_texture(_renderer: SDL_Renderer, _font: TTF_Font, _text: string, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_ttf/sdl_ttf_helpers.nanoextern fn nl_draw_text_blended(_renderer: SDL_Renderer, _font: TTF_Font, _text: string, _x: int, _y: int, _r: int, _g: int, _b: int, _a: int) -> int
modules/sdl_ttf/sdl_ttf_helpers.nanoextern fn nl_open_font_portable(_font_name: string, _ptsize: int) -> TTF_Font

sqlite#

Embedded SQL database for structured data storage and queries.

Source: modules/sqlite/

SourcePublic or foreign declaration
modules/sqlite/sqlite.nanopub fn SQLITE_OK() -> int { return 0 }
modules/sqlite/sqlite.nanopub fn SQLITE_ROW() -> int { return 100 }
modules/sqlite/sqlite.nanopub fn SQLITE_DONE() -> int { return 101 }
modules/sqlite/sqlite.nanopub fn SQLITE_INTEGER() -> int { return 1 }
modules/sqlite/sqlite.nanopub fn SQLITE_FLOAT() -> int { return 2 }
modules/sqlite/sqlite.nanopub fn SQLITE_TEXT() -> int { return 3 }
modules/sqlite/sqlite.nanopub fn SQLITE_BLOB() -> int { return 4 }
modules/sqlite/sqlite.nanopub fn SQLITE_NULL() -> int { return 5 }
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_version() -> string
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_version_number() -> int
modules/sqlite/sqlite.nanopub fn version() -> string {
modules/sqlite/sqlite.nanopub fn version_number() -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_open(_filename: string) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_close(_db: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_errmsg(_db: int) -> string
modules/sqlite/sqlite.nanopub fn open(filename: string) -> int {
modules/sqlite/sqlite.nanopub fn close(db: int) -> int {
modules/sqlite/sqlite.nanopub fn errmsg(db: int) -> string {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_exec(_db: int, _sql: string) -> int
modules/sqlite/sqlite.nanopub fn exec(db: int, sql: string) -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_prepare(_db: int, _sql: string) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_finalize(_stmt: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_step(_stmt: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_reset(_stmt: int) -> int
modules/sqlite/sqlite.nanopub fn prepare(db: int, sql: string) -> int {
modules/sqlite/sqlite.nanopub fn finalize(stmt: int) -> int {
modules/sqlite/sqlite.nanopub fn step(stmt: int) -> int {
modules/sqlite/sqlite.nanopub fn reset(stmt: int) -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_bind_int(_stmt: int, _index: int, _value: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_bind_double(_stmt: int, _index: int, _value: float) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_bind_text(_stmt: int, _index: int, _value: string) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_bind_null(_stmt: int, _index: int) -> int
modules/sqlite/sqlite.nanopub fn bind_int(stmt: int, index: int, value: int) -> int {
modules/sqlite/sqlite.nanopub fn bind_double(stmt: int, index: int, value: float) -> int {
modules/sqlite/sqlite.nanopub fn bind_text(stmt: int, index: int, value: string) -> int {
modules/sqlite/sqlite.nanopub fn bind_null(stmt: int, index: int) -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_count(_stmt: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_name(_stmt: int, _index: int) -> string
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_int(_stmt: int, _index: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_double(_stmt: int, _index: int) -> float
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_text(_stmt: int, _index: int) -> string
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_column_type(_stmt: int, _index: int) -> int
modules/sqlite/sqlite.nanopub fn column_count(stmt: int) -> int {
modules/sqlite/sqlite.nanopub fn column_name(stmt: int, index: int) -> string {
modules/sqlite/sqlite.nanopub fn column_int(stmt: int, index: int) -> int {
modules/sqlite/sqlite.nanopub fn column_double(stmt: int, index: int) -> float {
modules/sqlite/sqlite.nanopub fn column_text(stmt: int, index: int) -> string {
modules/sqlite/sqlite.nanopub fn column_type(stmt: int, index: int) -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_last_insert_rowid(_db: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_changes(_db: int) -> int
modules/sqlite/sqlite.nanopub fn last_insert_rowid(db: int) -> int {
modules/sqlite/sqlite.nanopub fn changes(db: int) -> int {
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_begin_transaction(_db: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_commit(_db: int) -> int
modules/sqlite/sqlite.nanoextern fn nl_sqlite3_rollback(_db: int) -> int
modules/sqlite/sqlite.nanopub fn begin_transaction(db: int) -> int {
modules/sqlite/sqlite.nanopub fn commit(db: int) -> int {
modules/sqlite/sqlite.nanopub fn rollback(db: int) -> int {
modules/sqlite/sqlite.nanopub fn exec_ok(db: int, sql: string) -> bool {
modules/sqlite/sqlite.nanopub fn has_row(step_result: int) -> bool {
modules/sqlite/sqlite.nanopub fn is_done(step_result: int) -> bool {

std#

Standard library with file I/O, process execution, environment variables.

Source: modules/std/

SourcePublic or foreign declaration
modules/std/binary.nanopub struct ReadVarint {
modules/std/binary.nanopub struct ReadInt {
modules/std/binary.nanopub struct ReadString {
modules/std/binary.nanopub struct ReadBytes {
modules/std/binary.nanopub struct ReadIntArray {
modules/std/binary.nanopub fn version() -> int { return 1 }
modules/std/binary.nanopub fn read_varint(buf: array<u8>, pos: int) -> Result<ReadVarint, string> {
modules/std/binary.nanopub fn encode_int(v: int) -> array<u8> {
modules/std/binary.nanopub fn decode_int(buf: array<u8>) -> Result<int, string> {
modules/std/binary.nanopub fn encode_bool(v: bool) -> array<u8> {
modules/std/binary.nanopub fn decode_bool(buf: array<u8>) -> Result<bool, string> {
modules/std/binary.nanopub fn encode_string(s: string) -> array<u8> {
modules/std/binary.nanopub fn decode_string(buf: array<u8>) -> Result<string, string> {
modules/std/binary.nanopub fn encode_int_array(a: array<int>) -> array<u8> {
modules/std/binary.nanopub fn decode_int_array(buf: array<u8>) -> Result<array<int>, string> {
modules/std/collections/array_utils.nanopub fn array_sort_strings(items: array<string>) -> array<string> {
modules/std/collections/hashmap.nanoextern fn nl_hm_new() -> NLHashMap
modules/std/collections/hashmap.nanoextern fn nl_hm_put(_hm: NLHashMap, _key: string, _value: string) -> void
modules/std/collections/hashmap.nanoextern fn nl_hm_has(_hm: NLHashMap, _key: string) -> bool
modules/std/collections/hashmap.nanoextern fn nl_hm_get(_hm: NLHashMap, _key: string) -> string
modules/std/collections/hashmap.nanoextern fn nl_hm_size(_hm: NLHashMap) -> int
modules/std/collections/hashmap.nanoextern fn nl_hm_keys(_hm: NLHashMap) -> array<string>
modules/std/collections/hashmap.nanoextern fn nl_hm_values(_hm: NLHashMap) -> array<string>
modules/std/collections/hashmap.nanoextern fn nl_hm_remove(_hm: NLHashMap, _key: string) -> void
modules/std/collections/hashmap.nanoextern fn nl_hm_clear(_hm: NLHashMap) -> void
modules/std/collections/hashmap.nanoextern fn nl_hm_free(_hm: NLHashMap) -> void
modules/std/collections/hashmap.nanopub struct HashMap {
modules/std/collections/hashmap.nanopub fn map_new() -> HashMap {
modules/std/collections/hashmap.nanopub fn map_put(hm: HashMap, key: string, value: string) -> HashMap {
modules/std/collections/hashmap.nanopub fn map_has(hm: HashMap, key: string) -> bool {
modules/std/collections/hashmap.nanopub fn map_get(hm: HashMap, key: string) -> string {
modules/std/collections/hashmap.nanopub fn map_size(hm: HashMap) -> int {
modules/std/collections/hashmap.nanopub fn map_keys(hm: HashMap) -> array<string> {
modules/std/collections/hashmap.nanopub fn map_values(hm: HashMap) -> array<string> {
modules/std/collections/hashmap.nanopub fn map_remove(hm: HashMap, key: string) -> HashMap {
modules/std/collections/hashmap.nanopub fn map_clear(hm: HashMap) -> HashMap {
modules/std/collections/hashmap.nanopub fn map_free(hm: HashMap) -> void {
modules/std/collections/hashmap.nanopub fn std_hm_new() -> HashMap {
modules/std/collections/hashmap.nanopub fn std_hm_put(hm: HashMap, key: string, value: string) -> HashMap {
modules/std/collections/hashmap.nanopub fn std_hm_has(hm: HashMap, key: string) -> bool {
modules/std/collections/hashmap.nanopub fn std_hm_get(hm: HashMap, key: string) -> string {
modules/std/collections/hashmap.nanopub fn std_hm_size(hm: HashMap) -> int {
modules/std/collections/hashmap.nanopub fn std_hm_keys(hm: HashMap) -> array<string> {
modules/std/collections/hashmap.nanopub fn std_hm_values(hm: HashMap) -> array<string> {
modules/std/collections/hashmap.nanopub fn std_hm_remove(hm: HashMap, key: string) -> HashMap {
modules/std/collections/hashmap.nanopub fn std_hm_clear(hm: HashMap) -> HashMap {
modules/std/collections/hashmap.nanopub fn std_hm_free(hm: HashMap) -> void {
modules/std/collections/set.nanoextern fn nl_set_new() -> NLStringSet
modules/std/collections/set.nanoextern fn nl_set_add(_s: NLStringSet, _key: string) -> void
modules/std/collections/set.nanoextern fn nl_set_has(_s: NLStringSet, _key: string) -> bool
modules/std/collections/set.nanoextern fn nl_set_size(_s: NLStringSet) -> int
modules/std/collections/set.nanoextern fn nl_set_values(_s: NLStringSet) -> array<string>
modules/std/collections/set.nanoextern fn nl_set_remove(_s: NLStringSet, _key: string) -> void
modules/std/collections/set.nanoextern fn nl_set_clear(_s: NLStringSet) -> void
modules/std/collections/set.nanoextern fn nl_set_free(_s: NLStringSet) -> void
modules/std/collections/set.nanopub struct Set {
modules/std/collections/set.nanopub fn set_new() -> Set {
modules/std/collections/set.nanopub fn set_add(s: Set, key: string) -> Set {
modules/std/collections/set.nanopub fn set_has(s: Set, key: string) -> bool {
modules/std/collections/set.nanopub fn set_size(s: Set) -> int {
modules/std/collections/set.nanopub fn set_values(s: Set) -> array<string> {
modules/std/collections/set.nanopub fn set_remove(s: Set, key: string) -> Set {
modules/std/collections/set.nanopub fn set_clear(s: Set) -> Set {
modules/std/collections/set.nanopub fn set_free(s: Set) -> void {
modules/std/collections/stringbuilder.nanoextern fn nl_sb_new() -> NLStringBuilder
modules/std/collections/stringbuilder.nanoextern fn nl_sb_with_capacity(_capacity: int) -> NLStringBuilder
modules/std/collections/stringbuilder.nanoextern fn nl_sb_append(_sb: NLStringBuilder, _text: string) -> void
modules/std/collections/stringbuilder.nanoextern fn nl_sb_append_char(_sb: NLStringBuilder, _ch: int) -> void
modules/std/collections/stringbuilder.nanoextern fn nl_sb_clear(_sb: NLStringBuilder) -> void
modules/std/collections/stringbuilder.nanoextern fn nl_sb_length(_sb: NLStringBuilder) -> int
modules/std/collections/stringbuilder.nanoextern fn nl_sb_capacity(_sb: NLStringBuilder) -> int
modules/std/collections/stringbuilder.nanoextern fn nl_sb_to_string(_sb: NLStringBuilder) -> string
modules/std/collections/stringbuilder.nanoextern fn nl_sb_free(_sb: NLStringBuilder) -> void
modules/std/collections/stringbuilder.nanopub struct StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_new() -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_with_capacity(capacity: int) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_append(sb: StringBuilder, text: string) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_append_line(sb: StringBuilder, text: string) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_append_int(sb: StringBuilder, n: int) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_append_char(sb: StringBuilder, c: int) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_to_string(sb: StringBuilder) -> string {
modules/std/collections/stringbuilder.nanopub fn sb_length(sb: StringBuilder) -> int {
modules/std/collections/stringbuilder.nanopub fn sb_capacity(sb: StringBuilder) -> int {
modules/std/collections/stringbuilder.nanopub fn sb_clear(sb: StringBuilder) -> StringBuilder {
modules/std/collections/stringbuilder.nanopub fn sb_is_empty(sb: StringBuilder) -> bool {
modules/std/collections/stringbuilder.nanopub fn sb_free(sb: StringBuilder) -> void {
modules/std/collections/stringbuilder.nanopub fn sb_from_parts(parts: array<string>) -> string {
modules/std/collections/stringbuilder.nanopub fn sb_join(parts: array<string>, separator: string) -> string {
modules/std/collections/stringbuilder.nanopub fn sb_repeat(text: string, n: int) -> string {
modules/std/collections/stringbuilder.nanopub fn sb_indent(level: int, spaces_per_level: int) -> string {
modules/std/crypto/sha256.nanopub fn u32_and(a: int, b: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_or(a: int, b: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_xor(a: int, b: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_not(x: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_shr(x: int, n: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_shl(x: int, n: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_rotr(x: int, n: int) -> int {
modules/std/crypto/sha256.nanopub fn u32_add(a: int, b: int) -> int {
modules/std/crypto/sha256.nanopub fn sha256_bytes(msg: array<u8>) -> string {
modules/std/crypto/sha256.nanopub fn sha256_string(s: string) -> string {
modules/std/diagnostics.nanopub struct Loc {
modules/std/diagnostics.nanopub struct Span {
modules/std/diagnostics.nanopub enum Severity {
modules/std/diagnostics.nanopub struct Diagnostic {
modules/std/diagnostics.nanopub fn loc(file: string, line: int, column: int) -> Loc {
modules/std/diagnostics.nanopub fn span_single(file: string, line: int, column: int) -> Span {
modules/std/diagnostics.nanopub fn diag_error(message: string, span: Span) -> Diagnostic {
modules/std/diagnostics.nanopub fn diag_warning(message: string, span: Span) -> Diagnostic {
modules/std/diagnostics.nanopub fn diag_note(message: string, span: Span) -> Diagnostic {
modules/std/env.nanoextern fn get_argc() -> int
modules/std/env.nanoextern fn get_argv(_index: int) -> string
modules/std/env.nanoextern fn nl_os_getenv(_name: string) -> string
modules/std/env.nanoextern fn nl_os_setenv(_name: string, _value: string, _overwrite: int) -> int
modules/std/env.nanoextern fn nl_os_unsetenv(_name: string) -> int
modules/std/env.nanopub fn get(name: string) -> string {
modules/std/env.nanopub fn set_env(name: string, value: string) -> int {
modules/std/env.nanopub fn unset(name: string) -> int {
modules/std/env.nanopub fn args() -> array<string> {
modules/std/env.nanopub fn argc() -> int {
modules/std/env.nanopub fn argv(index: int) -> string {
modules/std/fs.nanoextern fn fs_walkdir(_root: string) -> array<string>
modules/std/fs.nanoextern fn path_normalize(_path: string) -> string
modules/std/fs.nanoextern fn path_canonical(_path: string) -> string
modules/std/fs.nanoextern fn path_join(_a: string, _b: string) -> string
modules/std/fs.nanoextern fn path_basename(_path: string) -> string
modules/std/fs.nanoextern fn path_dirname(_path: string) -> string
modules/std/fs.nanoextern fn path_relpath(_target: string, _base: string) -> string
modules/std/fs.nanoextern fn file_read(_path: string) -> string
modules/std/fs.nanoextern fn file_write(_path: string, _content: string) -> int
modules/std/fs.nanoextern fn file_append(_path: string, _content: string) -> int
modules/std/fs.nanoextern fn file_exists(_path: string) -> bool
modules/std/fs.nanoextern fn file_delete(_path: string) -> int
modules/std/fs.nanoextern fn fs_mkdir_p(_path: string) -> int
modules/std/fs.nanoextern fn file_copy(_src: string, _dst: string) -> int
modules/std/fs.nanoextern fn dir_copy(_src: string, _dst: string) -> int
modules/std/fs.nanopub fn walkdir(root: string) -> array<string> {
modules/std/fs.nanopub fn normalize(path: string) -> string {
modules/std/fs.nanopub fn canonical(path: string) -> string {
modules/std/fs.nanopub fn join(a: string, b: string) -> string {
modules/std/fs.nanopub fn basename(path: string) -> string {
modules/std/fs.nanopub fn dirname(path: string) -> string {
modules/std/fs.nanopub fn relpath(target: string, base: string) -> string {
modules/std/fs.nanopub fn cwd() -> string {
modules/std/fs.nanopub fn glob_match(pattern: string, text: string) -> bool {
modules/std/fs.nanopub fn glob(root: string, pattern: string) -> array<string> {
modules/std/fs.nanopub fn read(path: string) -> string {
modules/std/fs.nanopub fn write(path: string, content: string) -> int {
modules/std/fs.nanopub fn append(path: string, content: string) -> int {
modules/std/fs.nanopub fn exists(path: string) -> bool {
modules/std/fs.nanopub fn delete(path: string) -> int {
modules/std/fs.nanopub fn mkdir_p(path: string) -> int {
modules/std/fs.nanopub fn copy_file(src: string, dst: string) -> int {
modules/std/fs.nanopub fn copy_dir(src: string, dst: string) -> int {
modules/std/graphx/graphx.nanopub struct Graph {
modules/std/graphx/graphx.nanopub fn graphx_graph_new(n: int) -> Graph {
modules/std/graphx/graphx.nanopub fn graphx_add_edge(g: Graph, u: int, v: int, w: int) -> Graph {
modules/std/graphx/graphx.nanopub fn graphx_add_arc(g: Graph, u: int, v: int) -> Graph {
modules/std/graphx/graphx.nanopub fn graphx_dijkstra(g: Graph, source: int, target: int) -> int {
modules/std/graphx/graphx.nanopub fn graphx_topo_sort(g: Graph) -> array<int> {
modules/std/graphx/graphx.nanopub fn graphx_has_cycle(g: Graph) -> bool {
modules/std/io/stdio.nanoextern fn nl_stdio_fopen(_filename: string, _mode: string) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fclose(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fread(_ptr: int, _size: int, _count: int, _file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fwrite(_ptr: int, _size: int, _count: int, _file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fflush(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fseek(_file: int, _offset: int, _whence: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_ftell(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_rewind(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_feof(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_ferror(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_clearerr(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fgetc(_file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_fputc(_c: int, _file: int) -> int
modules/std/io/stdio.nanoextern fn nl_stdio_ungetc(_c: int, _file: int) -> int
modules/std/io/stdio.nanopub fn fopen(filename: string, mode: string) -> int {
modules/std/io/stdio.nanopub fn fclose(file: int) -> int {
modules/std/io/stdio.nanopub fn fread(ptr: int, size: int, count: int, file: int) -> int {
modules/std/io/stdio.nanopub fn fwrite(ptr: int, size: int, count: int, file: int) -> int {
modules/std/io/stdio.nanopub fn fflush(file: int) -> int {
modules/std/io/stdio.nanopub fn fseek(file: int, offset: int, whence: int) -> int {
modules/std/io/stdio.nanopub fn ftell(file: int) -> int {
modules/std/io/stdio.nanopub fn rewind(file: int) -> int {
modules/std/io/stdio.nanopub fn feof(file: int) -> int {
modules/std/io/stdio.nanopub fn ferror(file: int) -> int {
modules/std/io/stdio.nanopub fn clearerr(file: int) -> int {
modules/std/io/stdio.nanopub fn fgetc(file: int) -> int {
modules/std/io/stdio.nanopub fn fputc(c: int, file: int) -> int {
modules/std/io/stdio.nanopub fn ungetc(c: int, file: int) -> int {
modules/std/io/stdio.nanopub fn file_size(filename: string) -> int {
modules/std/io/stdio.nanopub fn stdio_file_readable(filename: string) -> bool {
modules/std/json/json.nanoextern fn nl_json_parse(_text: string) -> Json
modules/std/json/json.nanoextern fn nl_json_free(_json: Json) -> void
modules/std/json/json.nanoextern fn nl_json_stringify(_json: Json) -> string
modules/std/json/json.nanoextern fn nl_json_is_null(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_is_bool(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_is_number(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_is_string(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_is_array(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_is_object(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_as_int(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_as_float(_json: Json) -> float
modules/std/json/json.nanoextern fn nl_json_as_bool(_json: Json) -> int
modules/std/json/json.nanoextern fn nl_json_as_string(_json: Json) -> string
modules/std/json/json.nanoextern fn nl_json_object_has(_obj: Json, _key: string) -> int
modules/std/json/json.nanoextern fn nl_json_get(_obj: Json, _key: string) -> Json
modules/std/json/json.nanoextern fn nl_json_object_keys(_obj: Json) -> array<string>
modules/std/json/json.nanoextern fn nl_json_array_size(_arr: Json) -> int
modules/std/json/json.nanoextern fn nl_json_get_index(_arr: Json, _idx: int) -> Json
modules/std/json/json.nanoextern fn nl_json_new_object() -> Json
modules/std/json/json.nanoextern fn nl_json_new_array() -> Json
modules/std/json/json.nanoextern fn nl_json_new_string(_s: string) -> Json
modules/std/json/json.nanoextern fn nl_json_new_int(_v: int) -> Json
modules/std/json/json.nanoextern fn nl_json_new_bool(_v: int) -> Json
modules/std/json/json.nanoextern fn nl_json_new_null() -> Json
modules/std/json/json.nanoextern fn nl_json_object_set(_obj: Json, _key: string, _val: Json) -> int
modules/std/json/json.nanoextern fn nl_json_array_push(_arr: Json, _val: Json) -> int
modules/std/json/json.nanopub fn parse(text: string) -> Json {
modules/std/json/json.nanopub fn free(json: Json) -> void {
modules/std/json/json.nanopub fn stringify(json: Json) -> string {
modules/std/json/json.nanopub fn is_null(json: Json) -> bool { return (!= (nl_json_is_null json) 0) }
modules/std/json/json.nanopub fn is_bool(json: Json) -> bool { return (!= (nl_json_is_bool json) 0) }
modules/std/json/json.nanopub fn is_number(json: Json) -> bool { return (!= (nl_json_is_number json) 0) }
modules/std/json/json.nanopub fn is_string(json: Json) -> bool { return (!= (nl_json_is_string json) 0) }
modules/std/json/json.nanopub fn is_array(json: Json) -> bool { return (!= (nl_json_is_array json) 0) }
modules/std/json/json.nanopub fn is_object(json: Json) -> bool { return (!= (nl_json_is_object json) 0) }
modules/std/json/json.nanopub fn as_int(json: Json) -> int { return (nl_json_as_int json) }
modules/std/json/json.nanopub fn as_float(json: Json) -> float { return (nl_json_as_float json) }
modules/std/json/json.nanopub fn as_bool(json: Json) -> bool { return (!= (nl_json_as_bool json) 0) }
modules/std/json/json.nanopub fn as_string(json: Json) -> string { return (nl_json_as_string json) }
modules/std/json/json.nanopub fn get_float(obj: Json, key: string) -> float {
modules/std/json/json.nanopub fn get_bool(obj: Json, key: string) -> bool {
modules/std/json/json.nanopub fn decode_int_array(arr: Json) -> array<int> {
modules/std/json/json.nanopub fn decode_string_array(arr: Json) -> array<string> {
modules/std/json/json.nanopub fn object_has(obj: Json, key: string) -> bool { return (!= (nl_json_object_has obj key) 0) }
modules/std/json/json.nanopub fn get(obj: Json, key: string) -> Json { return (nl_json_get obj key) }
modules/std/json/json.nanopub fn keys(obj: Json) -> array<string> { return (nl_json_object_keys obj) }
modules/std/json/json.nanopub fn array_size(arr: Json) -> int { return (nl_json_array_size arr) }
modules/std/json/json.nanopub fn get_index(arr: Json, idx: int) -> Json { return (nl_json_get_index arr idx) }
modules/std/json/json.nanopub fn new_object() -> Json { return (nl_json_new_object) }
modules/std/json/json.nanopub fn new_array() -> Json { return (nl_json_new_array) }
modules/std/json/json.nanopub fn new_string(s: string) -> Json { return (nl_json_new_string s) }
modules/std/json/json.nanopub fn new_int(v: int) -> Json { return (nl_json_new_int v) }
modules/std/json/json.nanopub fn new_bool(v: bool) -> Json {
modules/std/json/json.nanopub fn new_null() -> Json { return (nl_json_new_null) }
modules/std/json/json.nanopub fn object_set(obj: Json, key: string, val: Json) -> bool {
modules/std/json/json.nanopub fn json_array_push(arr: Json, val: Json) -> bool {
modules/std/json/json.nanopub fn get_string(obj: Json, key: string) -> string {
modules/std/json/json.nanopub fn get_int(obj: Json, key: string) -> int {
modules/std/lib.nanopub fn std_version() -> string {
modules/std/log/log.nanoextern fn nl_log_set_level(level: int) -> void
modules/std/log/log.nanoextern fn nl_log_get_level() -> int
modules/std/log/log.nanoextern fn nl_log_set_output_mode(mode: int) -> void
modules/std/log/log.nanoextern fn nl_log_get_output_mode() -> int
modules/std/log/log.nanoextern fn nl_log_set_file(path: string) -> void
modules/std/log/log.nanoextern fn nl_log_write(level: int, message: string) -> void
modules/std/log/log.nanoextern fn nl_log_write_event(level: int, event_id: string, message: string) -> void
modules/std/log/log.nanoextern fn nl_log_trace_enter(fn_name: string) -> int
modules/std/log/log.nanoextern fn nl_log_trace_exit(trace_id: int, fn_name: string) -> void
modules/std/log/log.nanoextern fn nl_log_trace_event(name: string, data: string) -> void
modules/std/log/log.nanopub fn set_log_level(level: int) -> void {
modules/std/log/log.nanopub fn set_output_mode(mode: int) -> void {
modules/std/log/log.nanopub fn set_log_file(path: string) -> void {
modules/std/log/log.nanopub fn get_log_level() -> int {
modules/std/log/log.nanopub fn log_write_event(level: int, event_id: string, message: string) -> void {
modules/std/log/log.nanopub fn log_write(level: int, message: string) -> void {
modules/std/log/log.nanopub fn log_debug(message: string) -> void {
modules/std/log/log.nanopub fn log_info(message: string) -> void {
modules/std/log/log.nanopub fn log_warn(message: string) -> void {
modules/std/log/log.nanopub fn log_error(message: string) -> void {
modules/std/log/log.nanopub fn log_fatal(message: string) -> void {
modules/std/log/log.nanopub fn trace_enter(fn_name: string) -> int {
modules/std/log/log.nanopub fn trace_exit(trace_id: int, fn_name: string) -> void {
modules/std/log/log.nanopub fn trace_event(name: string, data: string) -> void {
modules/std/log/log.nanopub fn log_int(level: int, message: string, value: int) -> void {
modules/std/log/log.nanopub fn log_debug_int(message: string, value: int) -> void {
modules/std/log/log.nanopub fn log_info_int(message: string, value: int) -> void {
modules/std/log/log.nanopub fn log_version() -> string {
modules/std/math/array_ops.nanopub fn assert_same_length(a: array<float>, b: array<float>) -> void {
modules/std/math/array_ops.nanopub fn array_add(a: array<float>, b: array<float>) -> array<float> {
modules/std/math/array_ops.nanopub fn array_sub(a: array<float>, b: array<float>) -> array<float> {
modules/std/math/array_ops.nanopub fn array_mul(a: array<float>, b: array<float>) -> array<float> {
modules/std/math/array_ops.nanopub fn array_div(a: array<float>, b: array<float>) -> array<float> {
modules/std/math/array_ops.nanopub fn array_add_scalar(a: array<float>, s: float) -> array<float> {
modules/std/math/array_ops.nanopub fn array_mul_scalar(a: array<float>, s: float) -> array<float> {
modules/std/math/array_ops.nanopub fn array_dot(a: array<float>, b: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_norm(a: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_normalize(a: array<float>) -> array<float> {
modules/std/math/array_ops.nanopub fn array_lerp(a: array<float>, b: array<float>, t: float) -> array<float> {
modules/std/math/array_ops.nanopub fn array_sum(a: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_mean(a: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_min(a: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_max(a: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_distance_squared(a: array<float>, b: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_distance(a: array<float>, b: array<float>) -> float {
modules/std/math/array_ops.nanopub fn array_sum_int(a: array<int>) -> int {
modules/std/math/array_ops.nanopub fn array_min_int(a: array<int>) -> int {
modules/std/math/array_ops.nanopub fn array_max_int(a: array<int>) -> int {
modules/std/math/complex.nanopub struct Complex {
modules/std/math/complex.nanopub fn complex_exp(z: Complex) -> Complex {
modules/std/math/matrix4.nanopub struct Mat4 {
modules/std/math/matrix4.nanopub fn mat4_identity() -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_get(m: Mat4, row: int, col: int) -> float {
modules/std/math/matrix4.nanopub fn mat4_set(m: Mat4, row: int, col: int, v: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_mul(a: Mat4, b: Mat4) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_mul_vec4(m: Mat4, v: Vector4D) -> Vector4D {
modules/std/math/matrix4.nanopub fn mat4_translation(tx: float, ty: float, tz: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_scale(sx: float, sy: float, sz: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_rotation_x(angle: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_rotation_y(angle: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_rotation_z(angle: float) -> Mat4 {
modules/std/math/matrix4.nanopub fn mat4_transform_point(m: Mat4, p: Vector3D) -> Vector3D {
modules/std/math/matrix4.nanopub fn mat4_transform_dir(m: Mat4, d: Vector3D) -> Vector3D {
modules/std/math/quaternion.nanopub struct Quat {
modules/std/math/vector2d.nanopub struct Vector2D {
modules/std/math/vector3d.nanopub struct Vector3D {
modules/std/math/vector4d.nanopub struct Vector4D {
modules/std/mathx/mathx.nanopub fn mathx_abs(x: int) -> int {
modules/std/mathx/mathx.nanopub fn mathx_gcd(a: int, b: int) -> int {
modules/std/mathx/mathx.nanopub fn mathx_clamp(x: int, lo: int, hi: int) -> int {
modules/std/mathx/mathx.nanopub fn mathx_isqrt(n: int) -> int {
modules/std/mathx/mathx.nanopub fn mathx_is_prime(n: int) -> bool {
modules/std/mathx/mathx.nanopub fn mathx_negate(x: int) -> int {
modules/std/peg/peg.nanoextern fn nl_peg_compile(_pattern: string) -> NlPeg
modules/std/peg/peg.nanoextern fn nl_peg_match(_peg: NlPeg, _input: string) -> int
modules/std/peg/peg.nanoextern fn nl_peg_captures(_peg: NlPeg, _input: string) -> array<string>
modules/std/peg/peg.nanoextern fn nl_peg_free(_peg: NlPeg) -> void
modules/std/peg/peg.nanopub fn compile(pattern: string) -> NlPeg {
modules/std/peg/peg.nanopub fn matches(peg: NlPeg, input: string) -> bool {
modules/std/peg/peg.nanopub fn captures(peg: NlPeg, input: string) -> array<string> {
modules/std/peg/peg.nanopub fn free(peg: NlPeg) -> void {
modules/std/peg/peg.nanopub fn quick_match(pattern: string, input: string) -> bool {
modules/std/peg/peg.nanopub fn quick_captures(pattern: string, input: string) -> array<string> {
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_compile(_grammar_src: string) -> Peg2Grammar
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_parse(_g: Peg2Grammar, _input: string) -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_find(_g: Peg2Grammar, _input: string) -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_matches(_g: Peg2Grammar, _input: string) -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_free(_g: Peg2Grammar) -> void
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_rule() -> string
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_capture() -> string
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_start() -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_end() -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_child_count() -> int
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_tree_text(_input: string) -> string
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_last_error() -> string
modules/std/peg2/peg2.nanoextern fn nl_peg2_ffi_last_error_pos() -> int
modules/std/peg2/peg2.nanopub fn peg2_compile(grammar_src: string) -> Peg2Grammar {
modules/std/peg2/peg2.nanopub fn peg2_free(g: Peg2Grammar) -> void {
modules/std/peg2/peg2.nanopub fn peg2_parse(g: Peg2Grammar, input: string) -> Peg2Result {
modules/std/peg2/peg2.nanopub fn peg2_find(g: Peg2Grammar, input: string) -> Peg2Result {
modules/std/peg2/peg2.nanopub fn peg2_matches(g: Peg2Grammar, input: string) -> bool {
modules/std/peg2/peg2.nanopub fn peg2_text(node: Peg2Node, input: string) -> string {
modules/std/peg2/peg2.nanopub fn peg2_parse_once(grammar_src: string, input: string) -> Peg2Result {
modules/std/peg2/peg2.nanopub fn peg2_find_once(grammar_src: string, input: string) -> Peg2Result {
modules/std/peg2/peg2.nanopub fn peg2_matches_once(grammar_src: string, input: string) -> bool {
modules/std/process.nanoextern fn nl_os_process_run(_command: string) -> array<string>
modules/std/process.nanoextern fn nl_os_system(_command: string) -> int
modules/std/process.nanoextern fn nl_os_process_spawn(_command: string) -> int
modules/std/process.nanoextern fn nl_os_process_is_running(_pid: int) -> int
modules/std/process.nanoextern fn nl_os_process_wait(_pid: int) -> int
modules/std/process.nanoextern fn nl_os_process_kill_group(_pid: int, _signal_number: int) -> int
modules/std/process.nanoextern fn nl_os_process_spawn_with_pipes(_command: string) -> array<string>
modules/std/process.nanoextern fn nl_os_fd_read_available(_fd: int) -> string
modules/std/process.nanoextern fn nl_os_fd_close(_fd: int) -> int
modules/std/process.nanopub struct Output {
modules/std/process.nanopub fn run(command: string) -> Output {
modules/std/process.nanopub fn exec(command: string) -> int {
modules/std/process.nanopub fn spawn(command: string) -> int {
modules/std/process.nanopub fn is_running(pid: int) -> int {
modules/std/process.nanopub fn wait(pid: int) -> int {
modules/std/process.nanopub fn kill_group(pid: int, signal_number: int) -> int {
modules/std/process.nanopub fn spawn_with_pipes(command: string) -> array<string> {
modules/std/process.nanopub fn fd_read_available(fd: int) -> string {
modules/std/process.nanopub fn fd_close(fd: int) -> int {
modules/std/regex_nfa/regex_nfa.nanopub struct NFA {
modules/std/regex_nfa/regex_nfa.nanopub fn nfa_new() -> NFA {
modules/std/regex_nfa/regex_nfa.nanopub fn nfa_add(n: NFA, kind: int, c: int, o1: int, o2: int) -> NFA {
modules/std/regex_nfa/regex_nfa.nanopub fn nfa_patch(n: NFA, outs: array<int>, target: int) -> NFA {
modules/std/regex_nfa/regex_nfa.nanopub fn outs_concat(a: array<int>, b: array<int>) -> array<int> {
modules/std/regex_nfa/regex_nfa.nanopub struct Frag {
modules/std/regex_nfa/regex_nfa.nanopub fn frag_new(start: int, outs: array<int>) -> Frag {
modules/std/regex_nfa/regex_nfa.nanopub struct CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub fn compile_result(nfa: NFA, frag: Frag, pos: int) -> CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub fn re_compile_atom(pat: string, n: NFA, pos: int) -> CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub fn re_compile_piece(pat: string, n: NFA, pos: int) -> CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub fn re_compile_concat(pat: string, n: NFA, pos: int) -> CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub fn re_compile_expr(pat: string, n: NFA, pos: int) -> CompileResult {
modules/std/regex_nfa/regex_nfa.nanopub struct CompileRoot {
modules/std/regex_nfa/regex_nfa.nanopub fn re_compile(pat: string) -> CompileRoot {
modules/std/regex_nfa/regex_nfa.nanopub fn re_add_state(nfa: NFA, state: int, states: array<int>, visited: array<bool>) -> array<int> {
modules/std/regex_nfa/regex_nfa.nanopub fn re_is_match(nfa: NFA, states: array<int>) -> bool {
modules/std/regex_nfa/regex_nfa.nanopub fn re_simulate(nfa: NFA, start: int, text: string, tpos: int) -> bool {
modules/std/regex_nfa/regex_nfa.nanopub fn re_match(pat: string, text: string) -> bool {
modules/std/regex_nfa/regex_nfa.nanopub fn re_match_full(pat: string, text: string) -> bool {
modules/std/result.nanopub union Result<T, E> {

stdio#

Standard I/O operations (print, println, read_line).

Source: modules/stdio/

SourcePublic or foreign declaration
modules/stdio/stdio.nanoextern fn nl_stdio_fopen(_filename: string, _mode: string) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fclose(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fread(_ptr: int, _size: int, _count: int, _file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fwrite(_ptr: int, _size: int, _count: int, _file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fseek(_file: int, _offset: int, _whence: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_ftell(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_rewind(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_feof(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_ferror(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_clearerr(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fflush(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fgetc(_file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_fputc(_c: int, _file: int) -> int
modules/stdio/stdio.nanoextern fn nl_stdio_ungetc(_c: int, _file: int) -> int

stdlib#

Extended standard library utilities (deprecated, use std).

Source: modules/stdlib/

SourcePublic or foreign declaration
modules/stdlib/checked_math.nanopub fn checked_add(a: int, b: int) -> Result<int, string> {
modules/stdlib/checked_math.nanopub fn checked_sub(a: int, b: int) -> Result<int, string> {
modules/stdlib/checked_math.nanopub fn checked_mul(a: int, b: int) -> Result<int, string> {
modules/stdlib/checked_math.nanopub fn checked_div(a: int, b: int) -> Result<int, string> {
modules/stdlib/checked_math.nanopub fn checked_mod(a: int, b: int) -> Result<int, string> {

tools#

Development tools and utilities for NanoLang projects.

Source: modules/tools/

SourcePublic or foreign declaration
modules/tools/dep_locator.nanoextern fn getenv(_name: string) -> string
modules/tools/dep_locator.nanoextern fn file_exists(_path: string) -> bool

ui_widgets#

UI widget library (buttons, sliders, text inputs) for SDL.

Source: modules/ui_widgets/

SourcePublic or foreign declaration
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_update_mouse_state() -> void
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_set_scale(_scale: float) -> void
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_button(_renderer: SDL_Renderer, _font: TTF_Font, _text: string,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_label(_renderer: SDL_Renderer, _font: TTF_Font, _text: string,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_slider(_renderer: SDL_Renderer, _x: int, _y: int, _w: int, _h: int,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_progress_bar(_renderer: SDL_Renderer, _x: int, _y: int, _w: int, _h: int,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_checkbox(_renderer: SDL_Renderer, _font: TTF_Font, _label: string,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_radio_button(_renderer: SDL_Renderer, _font: TTF_Font, _label: string,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_panel(_renderer: SDL_Renderer, _x: int, _y: int, _w: int, _h: int,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_scrollable_list(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_time_display(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_seekable_progress_bar(_renderer: SDL_Renderer, _x: int, _y: int, _w: int, _h: int,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_text_input(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_dropdown(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_number_spinner(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_tooltip(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_file_selector(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_image_button(_renderer: SDL_Renderer, _texture_id: int,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_code_display(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_code_display_ansi(_renderer: SDL_Renderer, _font: TTF_Font,
modules/ui_widgets/ui_widgets.nanoextern fn nl_ui_code_editor(_renderer: SDL_Renderer, _font: TTF_Font,

unicode#

Unicode string handling and UTF-8 operations.

Source: modules/unicode/

SourcePublic or foreign declaration
modules/unicode/unicode.nanoextern fn nl_str_byte_length(_s: string) -> int
modules/unicode/unicode.nanoextern fn nl_str_grapheme_length(_s: string) -> int
modules/unicode/unicode.nanoextern fn nl_str_codepoint_at(_s: string, _byte_idx: int) -> int
modules/unicode/unicode.nanoextern fn nl_str_grapheme_at(_s: string, _grapheme_idx: int) -> string
modules/unicode/unicode.nanoextern fn nl_str_to_lowercase(_s: string) -> string
modules/unicode/unicode.nanoextern fn nl_str_to_uppercase(_s: string) -> string
modules/unicode/unicode.nanoextern fn nl_str_normalize(_s: string, _form: int) -> string
modules/unicode/unicode.nanoextern fn nl_str_is_ascii(_s: string) -> bool
modules/unicode/unicode.nanoextern fn nl_str_is_valid_utf8(_s: string) -> bool
modules/unicode/unicode.nanoextern fn nl_str_casefold(_s: string) -> string
modules/unicode/unicode.nanoextern fn nl_str_display_width(_s: string) -> int

uv#

libuv asynchronous I/O for non-blocking operations.

Source: modules/uv/

SourcePublic or foreign declaration
modules/uv/uv.nanoextern fn nl_uv_version_string() -> string
modules/uv/uv.nanoextern fn nl_uv_version() -> int
modules/uv/uv.nanoextern fn nl_uv_default_loop() -> int
modules/uv/uv.nanoextern fn nl_uv_loop_new() -> int
modules/uv/uv.nanoextern fn nl_uv_loop_close(_loop: int) -> int
modules/uv/uv.nanoextern fn nl_uv_run(_loop: int, _mode: int) -> int
modules/uv/uv.nanoextern fn nl_uv_stop(_loop: int) -> void
modules/uv/uv.nanoextern fn nl_uv_loop_alive(_loop: int) -> int
modules/uv/uv.nanoextern fn nl_uv_loop_get_active_handles(_loop: int) -> int
modules/uv/uv.nanoextern fn nl_uv_now(_loop: int) -> int
modules/uv/uv.nanoextern fn nl_uv_update_time(_loop: int) -> void
modules/uv/uv.nanoextern fn nl_uv_hrtime() -> int
modules/uv/uv.nanoextern fn nl_uv_sleep(_msec: int) -> void
modules/uv/uv.nanoextern fn nl_uv_backend_timeout(_loop: int) -> int
modules/uv/uv.nanoextern fn nl_uv_strerror(_err: int) -> string
modules/uv/uv.nanoextern fn nl_uv_err_name(_err: int) -> string
modules/uv/uv.nanoextern fn nl_uv_translate_sys_error(_sys_errno: int) -> int
modules/uv/uv.nanoextern fn nl_uv_get_total_memory() -> int
modules/uv/uv.nanoextern fn nl_uv_get_free_memory() -> int
modules/uv/uv.nanoextern fn nl_uv_cpu_count() -> int
modules/uv/uv.nanoextern fn nl_uv_loadavg_1min() -> int
modules/uv/uv.nanoextern fn nl_uv_os_getpid() -> int
modules/uv/uv.nanoextern fn nl_uv_os_getppid() -> int
modules/uv/uv.nanoextern fn nl_uv_cwd() -> string
modules/uv/uv.nanoextern fn nl_uv_os_gethostname() -> string

vector2d#

2D vector mathematics (add, subtract, normalize, dot product, etc.).

Source: modules/vector2d/

SourcePublic or foreign declaration
modules/vector2d/vector2d.nanopub fn vec_new(x: float, y: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_zero() -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_add(a: Vector2D, b: Vector2D) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_sub(a: Vector2D, b: Vector2D) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_scale(v: Vector2D, s: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_dot(a: Vector2D, b: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_length(v: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_length_squared(v: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_distance(a: Vector2D, b: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_distance_squared(a: Vector2D, b: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_normalize(v: Vector2D) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_rotate(v: Vector2D, angle: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_from_angle(angle: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_to_angle(v: Vector2D) -> float {
modules/vector2d/vector2d.nanopub fn vec_lerp(a: Vector2D, b: Vector2D, t: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_clamp_length(v: Vector2D, max_len: float) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_perp(v: Vector2D) -> Vector2D {
modules/vector2d/vector2d.nanopub fn vec_reflect(v: Vector2D, normal: Vector2D) -> Vector2D {

websocket#

No discovery manifest yet.

Source: modules/websocket/

SourcePublic or foreign declaration
modules/websocket/websocket.nanoextern fn nl_ws_connect(_url: string) -> int
modules/websocket/websocket.nanoextern fn nl_ws_send(_handle: int, _message: string) -> int
modules/websocket/websocket.nanoextern fn nl_ws_receive(_handle: int) -> string
modules/websocket/websocket.nanoextern fn nl_ws_receive_timeout(_handle: int, _timeout_ms: int) -> string
modules/websocket/websocket.nanoextern fn nl_ws_close(_handle: int) -> int
modules/websocket/websocket.nanoextern fn nl_ws_is_connected(_handle: int) -> int
modules/websocket/websocket.nanoextern fn nl_ws_last_error(_handle: int) -> string
modules/websocket/websocket.nanopub fn connect(url: string) -> int {
modules/websocket/websocket.nanopub fn send(h: int, message: string) -> int {
modules/websocket/websocket.nanopub fn receive(h: int) -> string {
modules/websocket/websocket.nanopub fn receive_timeout(h: int, timeout_ms: int) -> string {
modules/websocket/websocket.nanopub fn close(h: int) -> int {
modules/websocket/websocket.nanopub fn is_connected(h: int) -> bool {
modules/websocket/websocket.nanopub fn last_error(h: int) -> string {