What is haskus-system?
haskus-system is a Haskell library for system programming on top of the Linux kernel. You can use it to build systems that only use:
- the Linux kernel
- the haskus-system library
- your code
You can think of
haskus-system as an Android-like software but in Haskell (and currently very far from being on par with Android) or as a haskus-system/Linux (similarly with GNU/Linux, but very far from being on par with GNU).
[For those who have been following the previous releases, it was initially called ViperVM (for the pun “Very High Performance Virtual Machine”) but this name was already used elsewhere and it was misleading (it’s not a VM).]
What’s new in 0.7?
Previous releases were hard to use (I’m not sure anyone has actually tried it) because you needed to manually install and configure Linux, SysLinux, etc. This release features a new tool ingeniously called
haskus-system-build which performs almost all of this automatically.
Start by installing the tool:
It will install the program into ~/.local/bin. Be sure to add this path to your $PATH environment variable.
Now to get started you just have to do:
and it should:
- download the default template
- download, configure and build Linux, SysLinux, libgmp, etc.
- build the example from the template (creating a ramdisk)
- start the system into QEMU
The tool doesn’t detect missing programs yet (lzip, cpio, qemu, etc.) so it may fail if they aren’t installed. Please refer to the documentation to know which ones are required.
Speaking about the documentation, I have improved it and you can know find it here:
Note that the programming guide (volume 2) is still a work in progress. You may think “great, we don’t know how to write systems but a least we can build them…”. I’m working on it (see below for contributing) but in the meantime you may want to look at how some examples work and at the Haddock documentation.
Examples are now in a distinct repository (https://github.com/haskus/haskus-system-examples/) and now they can be built easily with the build tool. For instance, to test the Clock example:
Screenshot of the Clock example in QEMU:
Screenshot of the Demo example in QEMU:
Both examples use Diagrams to perform the rendering with the Rasterific backend. Then haskus-system uses Linux’s DRM interface to show the diagram on the screen.
This is a screencast of the terminal demo I’m working on:
If you want to contribute to this project, don’t hesitate to: