harn_vm/stdlib_modules.rs
1/// Embedded standard library modules.
2///
3/// Each module is a `.harn` source file compiled into the binary via `include_str!`.
4/// They are only parsed/executed when a script does `import "std/<module>"`.
5pub fn get_stdlib_source(module: &str) -> Option<&'static str> {
6 match module {
7 "text" => Some(include_str!("stdlib_text.harn")),
8 "collections" => Some(include_str!("stdlib_collections.harn")),
9 _ => None,
10 }
11}