Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.

WiP - Eye of Mirage

This aims to be a portable image viewer based on MirageOS, using mirage-framebuffer solely using pure image rendering code - (no image libraries written in C).

The goal is to be able to use the same unikernel code to

  • be able to display an image, or a a directory containing images, on Linux/FreeBSD/MacOSX.
  • implement a QRExec-based Qubes AppVM that will display images transferred to it from other VMs.

Latest screenshot

PNG rendering of rainbow.png, with text and calibration pixel (different set of pixels) overlays on Qubes (yellow window) and SDL/Linux (blue window).

Qubes and SDL targets

Current limitations / feature list

This is very much a work-in-progress, so there's a lot of things that do not work. Off the top of my head:

  • It only displays one image, and there is no way to change.
  • Pixel color blending is not implemented; all you get is shades of red.
  • Transparency is not implemented.
  • Only PNG images are supported.
    • support for PNG, BMP, and GIF.
  • No scaling of the image is done.
    • Configurable zoom
  • The only target supported so far is Qubes (hardcoded). -t unix now supported
    • On which receiving images via QRexec is not implemented.
    • On which images are rendered upside-down.
  • with -t unix it should be able to open a file or directory passed on the command-line instead of having to compile them in
  • instead of ocaml-crunch for compiled-in things it should probably use the ppx_literal or whatever that ppx is called.


opam pin add -n mirage-framebuffer --dev -k git \

# Qubes target:
opam pin add -n mirage-qubes.0.7.0 --dev -k git \
opam pin add -n mirage-framebuffer-qubes --dev -k git \

# Unix target:
opam pin add -n mirage-framebuffer-tsdl --dev -k git \

# shared dependencies:

opam pin add -n mirage-framebuffer-imagelib --dev -k git \

# installing dependencies:

opam install lwt crunch mirage-logs \
             mirage-runtime mirage-types-lwt ocamlbuild cstruct \
             'imagelib>=20171028' mirage

# installing for qubes:
opam install mirage-framebuffer-qubes mirage-clock-freestanding

# installing for unix:
opam install mirage-framebuffer-tsdl mirage-clock-unix


  1. Compile image to an OCaml module
mkdir images/
cp image-to-display images/image.png
ocaml-crunch -m plain -o images/

Setup for QubesOS

  1. Follow the instructions at

  2. make clean
    mirage configure -t xen && make
    ../qubes-test-mirage/test-mirage eye_of_mirage.xen mirage-test

Setup for Unix

  1. make clean
    mirage configure -t unix && make && ./main.native


WiP image viewer using MirageOS




No releases published


No packages published


You can’t perform that action at this time.