Skip to main content

monty_types/
lib.rs

1#![doc = include_str!("../README.md")]
2
3/// The monty version this build was compiled as.
4pub const MONTY_VERSION: &str = env!("CARGO_PKG_VERSION");
5
6pub mod args;
7mod builtins;
8mod exceptions;
9mod file_mode;
10pub mod format;
11mod graph;
12mod io;
13mod object;
14mod os;
15mod os_policy;
16mod resource;
17mod results;
18mod run_options;
19pub mod scan;
20mod type_checking;
21mod uuid;
22mod virtual_path;
23
24pub use crate::{
25    builtins::BuiltinsFunctions,
26    exceptions::{
27        CodeLoc, ExcData, ExcType, JsonErrorData, MontyException, SourceRange, StackFrame, UnicodeErrorData,
28        UnicodeErrorObject, unicode_decode_error_msg,
29    },
30    file_mode::FileMode,
31    format::{FormatComplex, FormatFloat, StringRepr, bytes_repr, bytes_repr_fmt, string_repr_fmt, utf8_error_reason},
32    io::{
33        COLLECT_STREAMS_ENTRY_OVERHEAD, CollectedStreams, DEFAULT_MAX_PRINT_COLLECT_BYTES, PrintStream, PrintWriter,
34        PrintWriterCallback, check_print_collect_limit,
35    },
36    object::{
37        CallArgs, ConversionError, InvalidInputError, MAX_TIMEZONE_OFFSET_SECONDS, MIN_TIMEZONE_OFFSET_SECONDS,
38        MontyComplex, MontyDate, MontyDateTime, MontyFileHandle, MontyObject, MontyTime, MontyTimeDelta, MontyTimeZone,
39        MontyType, NamedValues, ObjectRef, unstable,
40    },
41    os::{
42        GetenvArgs, IMPORT_CALL, IMPORT_STUBS_CALL, IMPORT_STUBS_CALL_ID, MAX_SLEEP_SECONDS, MkdirCallArgs, MontyPath,
43        OpenCallArgs, OsFunctionCall, PathBytesDataArgs, PathStringDataArgs, RenameCallArgs, SleepError, TimeCaller,
44        UrandomArgs, dir_stat, file_stat, sleep_duration, sleep_duration_saturating, stat_result, symlink_stat,
45    },
46    os_policy::{
47        DateTimeSource, NamedZone, OsPolicy, ProcessTime, RandomSeed, RandomStart, SandboxTimeZone, SleepMode,
48        UnknownTimeZone, ZoneConstants, local_wall_clock, unix_seconds,
49    },
50    resource::{
51        BASELINE_MEMORY, DEFAULT_GC_INTERVAL, DEFAULT_MAX_RECURSION_DEPTH, DEFAULT_MAX_SUSPENSIONS,
52        LARGE_RESULT_THRESHOLD, LIVE_MEMORY, OOM_EXIT_CODE, ResourceError, ResourceLimits, ResourceTracker,
53        TimeLimitScope, allocate_into_baseline, memory_limit_with_headroom,
54    },
55    results::{ExtFunctionResult, NameLookupResult},
56    run_options::{AssertMessageAnnotations, CompileOptions, SOURCE_SCAN_THRESHOLD},
57    scan::ScanArgs,
58    type_checking::{
59        CHECKER_MODULE_NAMES, ModuleStub, ModuleStubError, SANDBOX_MODULE_NAMES, TypeCheckState, TypeCheckingConfig,
60        TypeCheckingFormat, is_identifier, validate_module_name,
61    },
62    uuid::MontyUuid,
63    virtual_path::{normalize_virtual_path, validate_cwd},
64};