Skip to content

feat: add QR bitmap generation service - #7

Open
jadehawk wants to merge 1 commit into
Free-Ink:masterfrom
jadehawk:feat/qr-bitmap
Open

jadehawk wants to merge 1 commit into
Free-Ink:masterfrom
jadehawk:feat/qr-bitmap

Conversation

@jadehawk

@jadehawk jadehawk commented Nov 27, 2026 •

Copy link
Copy Markdown

Why this matters to users

Entering a long URL or copying a pairing code from an e-reader into a phone is unnecessarily awkward. A scannable QR code makes account setup, sharing a link or opening a companion website much easier, especially on a device without a touchscreen keyboard.

During application development, a guest-side QR implementation caused the desktop pairing test to stall while performing the encoding in the RV32 interpreter. The integrated native implementation instead reused the firmware's existing QR encoder. A pairing QR code was successfully scanned on a Picco, and web sign-in QR codes were subsequently exercised on both X3 and Picco.

This is why a small host-backed bitmap service is useful: every application can reuse the native encoder instead of carrying its own encoding code and spending interpreted CPU time on the same task. The isolated PR tests the interface, not the encoder itself.

Summary

Add an optional host-backed QR bitmap capability for applications that need to display links, pairing codes, or other small payloads without embedding a QR encoder in each guest.

  • Add a bounded, length-delimited input and output contract. The returned bitmap has a little-endian width/height header and MSB-first byte-padded rows.
  • Reject empty/oversized inputs, invalid pointers, overlapping buffers and undersized output headers.
  • Hosts choose a supported QR version and error correction level, and return UNAVAILABLE if no encoder is supplied.
  • Generate the C, Rust and Zig bindings from the ABI description. The proposed syscall number 108 avoids the two numbers used by the open screenshot/rename PR feat: add generic framebuffer screenshot and filesystem rename primitives #5.

Validation

Full upstream make test passed with the pinned FreeInk SDK, including a real guest running against both an unsupported host and a mock encoder. The mock checks exact payload dispatch, output layout, short buffers and rejection before dispatch. This PR does not implement a QR encoder or firmware host integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant