All Projects → cfcs → mirage-framebuffer

cfcs / mirage-framebuffer

Licence: other
Experimental portable bitmap framebuffer graphics for MirageOS

Programming Languages

ocaml
1615 projects

Projects that are alternatives of or similar to mirage-framebuffer

docteur
An opiniated file-system for MirageOS
Stars: ✭ 16 (+0%)
Mutual labels:  mirageos
ocaml-x509
X509 (RFC5280) handling in OCaml
Stars: ✭ 40 (+150%)
Mutual labels:  mirageos
arp
Address resolution protocol (ARP) implementation in OCaml targeting MirageOS
Stars: ✭ 20 (+25%)
Mutual labels:  mirageos
eye-of-mirage
WiP image viewer using MirageOS
Stars: ✭ 16 (+0%)
Mutual labels:  mirageos
keyfender
Secure HSM implementation based on MirageOS
Stars: ✭ 33 (+106.25%)
Mutual labels:  mirageos
mirage-solo5
Solo5 core platform libraries for MirageOS
Stars: ✭ 18 (+12.5%)
Mutual labels:  mirageos
ocaml-dns
OCaml implementation of the DNS protocol
Stars: ✭ 93 (+481.25%)
Mutual labels:  mirageos
mirage-xen
Xen core platform libraries for MirageOS
Stars: ✭ 17 (+6.25%)
Mutual labels:  mirageos
rekernel
A minimal setup for writing Unikernels in ReasonML
Stars: ✭ 28 (+75%)
Mutual labels:  mirageos
awesome-unikernels
A list about Unikernels
Stars: ✭ 86 (+437.5%)
Mutual labels:  mirageos
prometheus
OCaml library for reporting metrics to a Prometheus server
Stars: ✭ 44 (+175%)
Mutual labels:  mirageos
mirage-xmpp
Implementation of XMPP for MirageOS
Stars: ✭ 12 (-25%)
Mutual labels:  mirageos
contruno
A TLS termination proxy as a MirageOS
Stars: ✭ 13 (-18.75%)
Mutual labels:  mirageos
Mirage
MirageOS is a library operating system that constructs unikernels
Stars: ✭ 1,707 (+10568.75%)
Mutual labels:  mirageos
Irmin
Built-in Snapshotting - backup and restore Storage Agnostic - you can use Irmin on top of your own storage layer Custom Datatypes - (de)serialization for custom data types, derivable via ppx_irmin Highly Portable - runs anywhere from Linux to web browsers and Xen unikernels Git Compatibility - irmin-git uses an on-disk format that can be inspected and modified using Git Dynamic Behavior - allows the users to define custom merge functions, use in-memory transactions (to keep track of reads as well as writes) and to define event-driven workflows using a notification mechanism
Stars: ✭ 1,524 (+9425%)
Mutual labels:  mirageos
ocaml-pcap
OCaml code for generating and analysing pcap (packet capture) files
Stars: ✭ 20 (+25%)
Mutual labels:  mirageos

Work in progress, nothing stable here.

Mirage-framebuffer

This repository contains a work-in-progress framebuffer graphics library for MirageOS, written in the OCaml programming language.

The library exposes basic operations such as pixel blitting, and input / window resize events.

The codebase is still under development and the interfaces are very volatile and change often. Contributions in the form of code, comments, ideas, research, or bug reports are very welcome, but please give me a heads-up in the form of a Github issue if you plan to introduce large changesets that may conflict with my local branches.

Backends

Currently two backends are supported:

I also have plans to implement an RDP/VNC backend that would act as a server exposing your graphical interfaces over a network connection.

Another backend I would like to see would be one using BuckleScript or js_of_ocaml to draw on a HTML5 Canvas inside a web browser.

Helpers for integration with other libraries

Included in this repository are some optional packages that let you use existing OCaml libraries with mirage-framebuffer.

They define functors to be applied with a framebuffer module, for example imagelib can be instantited with the TSDL backend: Framebuffer_image.Make( Framebuffer.Make(Framebuffer_tsdl) ).

  • mirage-framebuffer-imagelib: Helper library defining Framebuffer_image for Rodolphe Lepigre's imagelib, a pure picture format parser.

  • mirage-framebuffer-notty: Helper library defining Framebuffer_notty for use with David Kaloper's notty, a declarative (text-based) terminal library.

I hope that there will one day be a helper library for Daniel Bünzli's vg library for declarative 2D graphics, but there is no active development on this not full support yet.

Using the library

While it is intended to be used from MirageOS unikernels, taking advantage of its parametric compilation tooling to automatically select a backend, the library may also be used directly from your regular OCaml programs.

The main module defines a functor, Framebuffer.Make, which is applied with your backend of choice.

An example is included in test_tsdl/test_tsdl.ml.

Installing dependencies

# The main Framebuffer library:
opam pin add -n mirage-framebuffer 'https://github.com/cfcs/mirage-framebuffer.git#master'

# imagelib helper:
opam pin add -n mirage-framebuffer-imagelib 'https://github.com/cfcs/mirage-framebuffer.git#master'
opam pin add -n imagelib 'https://github.com/cfcs/ocaml-imagelib#gif_prelim'
opam pin add -n imagelib-unix 'https://github.com/cfcs/ocaml-imagelib#gif_prelim'

# Notty helper:
opam pin add -n mirage-framebuffer-notty 'https://github.com/cfcs/mirage-framebuffer.git#master'

# TSDL backend:
opam pin add -n mirage-framebuffer-tsdl 'https://github.com/cfcs/mirage-framebuffer.git#master'

# QubesOS backend:
opam pin add -n mirage-framebuffer-qubes 'https://github.com/cfcs/mirage-framebuffer.git#master'
## Patches to mirage-qubes (upstreamed to master awaiting release):
opam pin add -n mirage-qubes.0.7.0 'https://github.com/mirage/mirage-qubes'

# VG vector graphics library helper:
opam pin add -n mirage-framebuffer-vg 'https://github.com/cfcs/mirage-framebuffer.git#master'

opam install imagelib-unix mirage-framebuffer{,-tsdl,-qubes,-notty,-imagelib,-vg}

Sample TSDL backend

make test
./_build/default/test_tsdl/test_tsdl.exe

Sample VG renderer:

dune build test_vg -f

Projects using mirage-framebuffer:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].