Skip to content
/ drawfs Public

Drawfs is a prototype kernel device and message protocol.

License

Notifications You must be signed in to change notification settings

pgsdf/drawfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

drawfs

drawfs is a prototype kernel device and message protocol for a minimal graphics path:

  • A userspace client writes framed messages to /dev/draw
  • The kernel queues replies and events back to the same file descriptor via read(2)
  • Shared pixel surfaces are exposed to userspace via an explicit MAP_SURFACE ioctl followed by mmap(2)

This repository is intended as a stepping stone for integrating a fast, predictable drawing path into SemaDraw.

Platform

  • FreeBSD 15
  • Python 3 (tests)
  • Zig 0.15.2 (optional, for SemaDraw integration work)

Quick start

This repo includes build.sh to install the kernel sources into /usr/src, build the module, and load it.

./build.sh install
./build.sh build
./build.sh load
./build.sh test

The test action runs the current end to end tests in tests/.

Repository layout

  • sys/dev/drawfs/ kernel device implementation
    • drawfs.c - device operations, session lifecycle, message dispatch
    • drawfs_surface.c - surface management, mmap backing
    • drawfs_frame.c - frame validation and building
  • sys/modules/drawfs/ kmod build glue
  • tests/ python and C tests (step based)
    • drawfs_test.py - shared test helpers and protocol encoding
    • drawfs_dump.py - debug tool for decoding raw frames
  • docs/ design and protocol documentation

License

See LICENSE.

About

Drawfs is a prototype kernel device and message protocol.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •