- added a new libary libm containing procedural macros for the kernel.

these should be used to include external files and resources in the kernel binary
  at compile time.
  - libm currently supports loading psf-1 formatted fonts
- added two fonts that are included in the binary at compile time
- refactored libk to make the crate structure more organised and maintainable in future.
  new structure:
    - drivers   (hardware interaction)
    - resources (consts and statics included either manually or via macros)
    - std       (standard functions for higher level interaction with the os, for example creating windows)
- added geometry.rs
  - provides the Vec2<T> struct for use with dimensions, coordinates etc.
- added window.rs
  - provides the Window struct for rendering the state of an application to the screen
- added application.rs
  - provides the Application trait for custom programs to implement in order to run
This commit is contained in:
2025-02-24 03:26:49 +00:00
parent 7ff33659fe
commit d9bbdff08c
36 changed files with 421 additions and 39 deletions
+16 -4
View File
@@ -1,4 +1,5 @@
#![no_std]
#![allow(async_fn_in_trait)]
#![warn(tail_expr_drop_order)]
#![warn(clippy::correctness, clippy::perf, clippy::nursery)]
// alloc
@@ -8,11 +9,22 @@
extern crate alloc;
pub mod io;
pub mod kalloc;
pub mod scheduling;
pub mod drivers;
pub mod resources;
pub mod std;
/// Re-exports most of the IO macros.
/// Re-exports most of the IO macros as well as standard allocation stuff
pub mod prelude {
pub use crate::drivers::io::ascii::{_print, _print_log};
pub use crate::{print, print_log, println, println_log, serial_print, serial_println};
pub use alloc::{
boxed::Box,
string::{String, ToString},
vec::Vec,
};
}
pub use crate::drivers::io::{
ascii::{_print, _print_log},
serial::_serial_write,
};