add basic script repl

This commit is contained in:
Matthieu Jolimaitre 2024-10-25 01:44:27 +02:00
parent 0d1a12202f
commit a2cca0be4e
15 changed files with 1041 additions and 61 deletions

View file

@ -1,23 +1,23 @@
use lazy_static::lazy_static;
use spin::Mutex;
// use lazy_static::lazy_static;
// use spin::Mutex;
use crate::hard::keyboard::Keyboard;
// use crate::hard::keyboard::Keyboard;
lazy_static! {
static ref In: Mutex<Input> = Mutex::new(Input::init());
}
// lazy_static! {
// static ref In: Mutex<Input> = Mutex::new(Input::init());
// }
pub struct Input {
keyboard: Keyboard,
}
// pub struct Input {
// keyboard: Keyboard,
// }
impl Input {
pub fn init() -> Self {
let keyboard = Keyboard;
Self { keyboard }
}
// impl Input {
// pub fn init() -> Self {
// let keyboard = Keyboard;
// Self { keyboard }
// }
pub fn read(out: &mut [char]) -> usize {
0
}
}
// pub fn read(out: &mut [char]) -> usize {
// 0
// }
// }