Skip to main content

doge_runtime/
lib.rs

1mod builtins;
2mod display;
3mod error;
4mod functions;
5mod methods;
6mod objects;
7mod ops;
8mod ordered_map;
9mod stdlib;
10mod value;
11
12pub use builtins::{bark, gib, interp, len, range, to_float, to_int, to_str};
13pub use error::{
14    assert_error, bonk_error, enter_call, error_field, error_value, exit_call, DogeError,
15    DogeResult, ErrorKind,
16};
17pub use functions::{callee_function, cell_get, cell_set, function_arity_error};
18pub use methods::{builtin_method, has_builtin_method};
19pub use objects::{
20    attr_get, attr_get_or_bind, attr_set, method_arity_error, no_such_method, object_class_id,
21};
22pub use ops::{
23    add, bitand, bitnot, bitor, bitxor, div, eq, floordiv, ge, gt, in_, index_get, index_set,
24    iter_value, le, lt, mul, ne, neg, not_, not_in, pow, rem, shl, shr, slice_get, sub,
25    unpack_value, values_equal,
26};
27pub use ordered_map::OrderedMap;
28pub use stdlib::env::{env_args, env_get, set_script_args};
29pub use stdlib::fetch::{fetch_append, fetch_delete, fetch_exists, fetch_read, fetch_write};
30pub use stdlib::nerd::{
31    nerd_abs, nerd_ceil, nerd_floor, nerd_max, nerd_min, nerd_pow, nerd_round, nerd_sqrt,
32};
33pub use stdlib::strings::{
34    strings_beeg, strings_contains, strings_join, strings_replace, strings_smoll, strings_split,
35    strings_trim,
36};
37pub use value::{BoundMethodData, Cell, FunctionData, Value};
38
39// Re-exported so the generated glue can build capture cells without importing
40// std directly — it only ever writes `use doge_runtime::*;`.
41pub use std::cell::RefCell;
42pub use std::rc::Rc;