lib-console provides shared framebuffer console primitives used by bootloader, kernel, and userspace console services.
Find a file
Erik Inkinen 9ced500bdb
All checks were successful
CI / test (push) Successful in 4s
CI / security (push) Successful in 1m26s
CI / minimal-versions (push) Successful in 10s
lib-console: drop unstable rustfmt options for stable toolchains
2026-03-23 10:19:53 +02:00
.github ci: add standard rust workflow 2026-03-11 11:12:32 +02:00
src renderer: clamp imported continuity cursor to visible grid 2026-03-15 06:07:16 +02:00
.editorconfig Initial commit 2026-03-11 05:10:03 +01:00
.gitignore Initial commit 2026-03-11 05:10:03 +01:00
ARCHITECTURE.md lib-console: replace template docs with renderer architecture and roadmap 2026-03-11 11:10:39 +02:00
Cargo.toml phase3: implement lib-console framebuffer console primitives 2026-03-11 09:54:16 +02:00
CODE_OF_CONDUCT.md Initial commit 2026-03-11 05:10:03 +01:00
CONTRIBUTING.md Initial commit 2026-03-11 05:10:03 +01:00
LICENSE Initial commit 2026-03-11 05:10:03 +01:00
README.md lib-console: replace template docs with renderer architecture and roadmap 2026-03-11 11:10:39 +02:00
ROADMAP.md lib-console: replace template docs with renderer architecture and roadmap 2026-03-11 11:10:39 +02:00
rustfmt.toml lib-console: drop unstable rustfmt options for stable toolchains 2026-03-23 10:19:53 +02:00
SECURITY.md Initial commit 2026-03-11 05:10:03 +01:00

lib-console

lib-console provides shared framebuffer console primitives used by bootloader, kernel, and userspace console services.

It is a no_std, allocation-free library with strict bounds checking and a small deterministic API surface.


Responsibilities

  • parse/validate PF2 font container identity
  • validate framebuffer geometry and pixel formats
  • provide bounded text rendering into linear framebuffers
  • track cursor/continuity/render status metadata

lib-console is not responsible for IPC, kernel mappings, or device discovery.


Public API

Core items:

  • FramebufferInfoV1
  • Pf2FontInfoV1
  • ConsoleStatusV1
  • ConsoleRendererV1
  • parse_pf2_font_info(...)

Supported pixel formats:

  • PIXEL_FORMAT_BGRA8888
  • PIXEL_FORMAT_RGBA8888

PF2 detection supports both direct and FILE-wrapped magic.


Determinism and safety

  • all geometry and size math is checked
  • renderer never writes outside the provided framebuffer slice
  • unsupported bytes are rendered as stable fallback glyphs (?)
  • scrolling and cursor updates are deterministic

Build and test

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test