diff options
Diffstat (limited to 'crates/sloth_vm/src/sloth_std/mod.rs')
| -rw-r--r-- | crates/sloth_vm/src/sloth_std/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/sloth_vm/src/sloth_std/mod.rs b/crates/sloth_vm/src/sloth_std/mod.rs index 86611d7..b40fb9a 100644 --- a/crates/sloth_vm/src/sloth_std/mod.rs +++ b/crates/sloth_vm/src/sloth_std/mod.rs @@ -4,8 +4,10 @@ use once_cell::sync::Lazy; use crate::native::NativeFunction; +pub mod file; pub mod rand; pub mod stdio; +pub mod term; pub static NATIVE_LIBRARY: Lazy<HashMap<&'static str, NativeFunction>> = Lazy::new(|| { let mut map = HashMap::new(); @@ -16,9 +18,16 @@ pub static NATIVE_LIBRARY: Lazy<HashMap<&'static str, NativeFunction>> = Lazy::n // stdio map.insert("write", stdio::WRITE_FUNCTION); + map.insert("writeln", stdio::WRITELN_FUNCTION); map.insert("read", stdio::READ_FUNCTION); + // term + map.insert("term$clear", term::TERM_CLEAR); + map.insert("term$setpos", term::TERM_SETPOS); + // filesystem + map.insert("file$read", file::FILE_READ); + map.insert("file$write", file::FILE_WRITE); map }); |
