Skip to main content

doge_runtime/
lib.rs

1mod builtins;
2mod codec;
3mod display;
4mod error;
5mod functions;
6mod methods;
7mod objects;
8mod ops;
9mod ordered_map;
10mod pack;
11mod stdlib;
12mod value;
13
14pub use builtins::{bark, gib, interp, len, range, to_bytes, to_decimal, to_float, to_int, to_str};
15pub use error::{
16    assert_error, bonk_error, enter_call, error_field, error_value, exit_call, DogeError,
17    DogeResult, ErrorKind,
18};
19pub use functions::{callee_function, cell_get, cell_set, function_arity_error};
20pub use methods::{builtin_method, has_builtin_method};
21pub use objects::{
22    attr_get, attr_get_or_bind, attr_set, method_arity_error, no_such_method, object_class_id,
23};
24pub use ops::{
25    add, bitand, bitnot, bitor, bitxor, div, eq, floordiv, ge, gt, in_, index_get, index_set,
26    iter_value, le, lt, mul, ne, neg, not_, not_in, pow, rem, shl, shr, slice_get, sub,
27    unpack_value, values_equal,
28};
29pub use ordered_map::OrderedMap;
30pub use pack::{
31    finish_pup, pack_snapshot, pack_value, unpack_globals, unpack_packed, BowlHandle, PackMode,
32    Packed, PackedError, PupEntry,
33};
34pub use stdlib::chase::chase_run;
35pub use stdlib::crypto::{crypto_hmac_sha256, crypto_same, crypto_sha256, crypto_token};
36pub use stdlib::dson::{dson_emit, dson_parse};
37pub use stdlib::env::{env_args, env_get, set_script_args};
38pub use stdlib::fetch::{
39    fetch_append, fetch_basename, fetch_copy, fetch_delete, fetch_exists, fetch_ext, fetch_join,
40    fetch_list, fetch_make_dir, fetch_read, fetch_read_bytes, fetch_remove_dir, fetch_rename,
41    fetch_stat, fetch_write, fetch_write_bytes,
42};
43pub use stdlib::howl::{
44    howl_accept, howl_close, howl_connect, howl_get, howl_listen, howl_port, howl_post, howl_recv,
45    howl_recv_bytes, howl_recv_line, howl_request, howl_send, howl_send_bytes,
46};
47pub use stdlib::hunt::{hunt_find, hunt_find_all, hunt_groups, hunt_replace, hunt_test};
48pub use stdlib::json::{json_emit, json_parse};
49pub use stdlib::nap::{nap_mono, nap_now, nap_parse, nap_rest, nap_stamp};
50pub use stdlib::nerd::{
51    nerd_abs, nerd_ceil, nerd_floor, nerd_max, nerd_min, nerd_pow, nerd_round, nerd_sqrt,
52};
53pub use stdlib::pack::{pack_bowl, pack_drop, pack_fetch, pack_sniff, pack_zoom, spawn_pup};
54pub use stdlib::roll::{roll_choice, roll_float, roll_int, roll_sample, roll_seed, roll_shuffle};
55pub use stdlib::strings::{
56    strings_beeg, strings_contains, strings_join, strings_replace, strings_smoll, strings_split,
57    strings_trim,
58};
59pub use value::{BoundMethodData, Cell, FunctionData, Value};
60
61// Re-exported so the generated glue can build capture cells without importing
62// std directly — it only ever writes `use doge_runtime::*;`.
63pub use std::cell::RefCell;
64pub use std::rc::Rc;