1 unstable release
0.1.0 | Aug 21, 2020 |
---|
#150 in #printing
8KB
128 lines
kernel-print-rs
A windows kernel printing library that implements the print!
, println!
and dbg!
macros so they can be used without the use of an allocator.
By default the macros are prefixed with kernel_
. If you want to remove the prefix, you can enable the std_name
feature.
Usage
Exactly as you'd use the original macros from the standard library.
#![no_std]
// ...
kernel_dbg!(2 + 2);
kernel_print!("{} + {} = {}\n", 2, 2, 2 + 2);
kernel_println!("{} + {} = {}", 2, 2, 2 + 2);
Features
std_name
: Allows you to use the macros without thekernel_
prefix.format
: Uses theformat!
macro instead of thecore::fmt::Write
trait to convert the passed data into a string.
Dependencies
~1MB
~23K SLoC