From 610e575043bfc75feafcce5bddaf7e1a436e5d02 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 7 Dec 2025 14:23:22 -0500 Subject: First commit --- src/builtins.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/builtins.rs (limited to 'src/builtins.rs') diff --git a/src/builtins.rs b/src/builtins.rs new file mode 100644 index 0000000..0a74265 --- /dev/null +++ b/src/builtins.rs @@ -0,0 +1,19 @@ +use std::sync::mpsc::Receiver; + +use happylock::ThreadKey; + +use crate::pipe::Message; + +pub type BuiltinProgram = fn(ThreadKey, Receiver); +pub static BUILTINS: &[Option] = + &[None, Some(hello), Some(delsh::delsh), Some(dit::dit)]; + +mod delsh; +mod dit; +mod doer; + +fn hello(key: ThreadKey, channel: Receiver) { + println!("Hello, world!"); + drop(channel); + drop(key); +} -- cgit v1.2.3