unlab_gpu/lib.rs
1//
2// Copyright (c) 2025-2026 Ćukasz Szpakowski
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at https://mozilla.org/MPL/2.0/.
7//
8//! Micro neural scripting language for GPU is simple scripting language that operates on matrices.
9//!
10//! This scripting language is implemented in the Unlab-gpu library that uses the Unmtx-gpu library
11//! to operate on matrices. Also, the Unlab-gpu library implements a package manager that can be
12//! used to install and remove packages.
13//!
14//! The Unlab-gpu library is a very modular library that contains the following components for this
15//! scripting language:
16//!
17//! - lexer
18//! - parser
19//! - interpreter
20//! - standard built-in functions
21//! - getopts
22//! - plotter
23//! - documentation generator
24//! - package manager
25//! - tester
26//!
27//! This scripting language is extensible by the Unlab-gpu library. The Unlab-gpu library allows to
28//! extend this scripting language with own built-in functions. The standard built-in functions of
29//! this scripting language also can be replaced by own built-in functions.
30pub use ctrlc;
31pub use curl;
32pub use serde;
33pub use serde_json;
34pub use toml;
35pub use unmtx_gpu as matrix;
36#[cfg(feature = "plot")]
37pub use winit;
38
39pub mod backend;
40pub mod builtin_doc;
41pub mod builtins;
42pub mod dfs;
43pub mod doc;
44pub mod env;
45pub mod error;
46pub mod fs;
47pub mod getopts;
48pub mod getopts_doc;
49pub mod home;
50pub mod interp;
51pub mod intr;
52pub mod io;
53pub mod lexer;
54pub mod main_loop;
55pub mod mod_node;
56pub mod parser;
57pub mod pkg;
58pub mod pkg_cmds;
59#[cfg(feature = "plot")]
60pub mod plot;
61#[cfg(feature = "plot")]
62pub mod plot_doc;
63pub mod tester;
64pub mod tree;
65pub mod utils;
66pub mod value;
67pub mod version;
68
69pub use backend::initialize_backend;
70pub use backend::finalize_backend;
71pub use builtins::add_std_builtin_funs;
72pub use env::Env;
73pub use error::Error;
74pub use error::Result;
75pub use home::Home;
76pub use interp::Interp;
77pub use main_loop::main_loop;
78pub use mod_node::ModNode;
79pub use parser::parse;
80pub use parser::parse_with_doc_root_mod;
81pub use parser::parse_with_doc_root_mod_and_doc_current_mod;
82pub use tree::Tree;
83pub use value::Value;
84
85#[cfg(test)]
86pub(crate) mod test_helpers;