mica_std/lib.rs
1//! The Mica standard library. Provides functions that can be registered in engines.
2
3#![allow(clippy::or_fun_call)]
4
5mod builtins;
6mod core;
7mod gc;
8#[cfg(feature = "io")]
9mod io;
10mod iterators;
11
12use mica_hl::Engine;
13
14pub use crate::builtins::lib;
15pub use crate::core::load_core;
16#[cfg(feature = "io")]
17pub use crate::io::load_io;
18
19/// Loads the full standard library into the engine.
20pub fn load(engine: &mut Engine) -> Result<(), mica_hl::Error> {
21 load_core(engine)?;
22 #[cfg(feature = "io")]
23 load_io(engine)?;
24
25 Ok(())
26}