diff --git a/Cargo.lock b/Cargo.lock index fc3b11b..9dd5c5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -49,6 +49,13 @@ dependencies = [ "spin", ] +[[package]] +name = "lib_application" +version = "0.1.0" +dependencies = [ + "lib_ascii", +] + [[package]] name = "lib_ascii" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 8b3748c..0d17198 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = [ "lib/lib_serial", "lib/lib_ascii", "kernel" -] +, "lib/lib_application"] resolver = "2" [workspace.package] diff --git a/kernel/src/main.rs b/kernel/src/main.rs index c6ae3fc..9e619b3 100644 --- a/kernel/src/main.rs +++ b/kernel/src/main.rs @@ -4,7 +4,7 @@ use core::arch::asm; use lib_serial::{serial_println, serial_read}; -use lib_ascii::{println, WRITER}; +use lib_ascii::{print, println, WRITER}; use limine::request::{RequestsEndMarker, RequestsStartMarker}; use limine::BaseRevision; @@ -63,6 +63,10 @@ unsafe extern "C" fn kmain() -> ! { \\______/ \\______/ \\_/ \\______| "); + for i in 0u8..128 { + print!("{}", i as char); + } + hcf(); } diff --git a/lib/lib_application/Cargo.toml b/lib/lib_application/Cargo.toml new file mode 100644 index 0000000..ef6aceb --- /dev/null +++ b/lib/lib_application/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "lib_application" +version.workspace = true +edition.workspace = true + +[dependencies] +lib_ascii = { path = "../lib_ascii" } diff --git a/lib/lib_application/src/application.rs b/lib/lib_application/src/application.rs new file mode 100644 index 0000000..285c09e --- /dev/null +++ b/lib/lib_application/src/application.rs @@ -0,0 +1,10 @@ + +pub trait Application { + fn run(&mut self, args: [&'static str; 5]) -> Result<(), Error>; +} + +pub enum Error { + OsError(&'static str), + ApplicationError(&'static str), +} + diff --git a/lib/lib_application/src/frame.rs b/lib/lib_application/src/frame.rs new file mode 100644 index 0000000..e69de29 diff --git a/lib/lib_application/src/lib.rs b/lib/lib_application/src/lib.rs new file mode 100644 index 0000000..e8d59dd --- /dev/null +++ b/lib/lib_application/src/lib.rs @@ -0,0 +1,5 @@ +#![no_std] + +pub mod application; +pub mod frame; +pub mod window; \ No newline at end of file diff --git a/lib/lib_application/src/window.rs b/lib/lib_application/src/window.rs new file mode 100644 index 0000000..1cecb3c --- /dev/null +++ b/lib/lib_application/src/window.rs @@ -0,0 +1,14 @@ + +pub struct Window { + width: usize, + height: usize +} + +impl Window { + pub fn new() -> Self { + Self { + width: 0, + height: 0 + } + } +} \ No newline at end of file diff --git a/lib/lib_ascii/src/font.rs b/lib/lib_ascii/src/font.rs index 0cd6ba4..be7a194 100644 --- a/lib/lib_ascii/src/font.rs +++ b/lib/lib_ascii/src/font.rs @@ -1,3 +1,6 @@ + + + pub static FONT: [u8; 128 * 16] = [ // ASCII 0-31 (Control Characters) - Using simple box patterns // NUL (0)