started work on lib_application - progress limited as requires alloc support to make further progress

This commit is contained in:
2025-02-21 16:13:06 +00:00
parent e626a3bcf2
commit f0e25c7a5d
9 changed files with 52 additions and 2 deletions
Generated
+7
View File
@@ -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"
+1 -1
View File
@@ -4,7 +4,7 @@ members = [
"lib/lib_serial",
"lib/lib_ascii",
"kernel"
]
, "lib/lib_application"]
resolver = "2"
[workspace.package]
+5 -1
View File
@@ -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();
}
+7
View File
@@ -0,0 +1,7 @@
[package]
name = "lib_application"
version.workspace = true
edition.workspace = true
[dependencies]
lib_ascii = { path = "../lib_ascii" }
+10
View File
@@ -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),
}
View File
+5
View File
@@ -0,0 +1,5 @@
#![no_std]
pub mod application;
pub mod frame;
pub mod window;
+14
View File
@@ -0,0 +1,14 @@
pub struct Window {
width: usize,
height: usize
}
impl Window {
pub fn new() -> Self {
Self {
width: 0,
height: 0
}
}
}
+3
View File
@@ -1,3 +1,6 @@
pub static FONT: [u8; 128 * 16] = [
// ASCII 0-31 (Control Characters) - Using simple box patterns
// NUL (0)