Giter Site home page Giter Site logo

patrick-lafferty / saturn Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 2.0 1.97 MB

A microkernel based operating system developed from scratch. This repository also includes all Saturn services and applications.

Home Page: https://saturn-os.org

License: Other

Makefile 0.26% C 4.03% C++ 92.12% Assembly 3.07% Scilab 0.12% Shell 0.24% CMake 0.15%
operating-system kernel microkernel osdev cpp cpp17 smp x86-64 baremetal window-manager

saturn's Introduction

Saturn

Saturn is a new operating system I started in Oct 2017. It is a 64-bit microkernel with multitasking and IPC based around asynchronous message passing. With the exception of LLVM's libc++ and FreeType, the entire system and services are being written from scratch by me in C++. Saturn is not just the kernel, it encompases all the services and drivers needed to provide a complete desktop system.

The repository is organized into simple sections. The entire kernel is under src/kernel, all services including Apollo are under src/services, and applications can be found in src/applications.

Features

Latest Screenshot
Dsky application demonstrating Gemini interpreter

Apollo

Apollo is Saturn's UI framework. Apollo has a tiled window manager that divides up the screen into tiles. One of the main goals of Apollo is to support rapid UI prototyping. To accomplish this, Apollo uses a declarative layout language called Mercury. By editing Mercury files you can easily create and modify an application's UI.

(grid

    (rows (fixed-height 50) (proportional-height 1))
    (columns (fixed-width 50) (proportional-width 1))

    (items
        
        (label (caption "This is a label")
            (alignment (vertical center))
            (padding (horizontal 10))
            (meta (grid (column 1))))

        (list-view
            (meta (grid (row 1) (column-span 2)))
            (item-source (bind entries))

            (item-template
                (label (caption (bind content))
                    (background (bind background))
                    (font-colour (bind fontColour)))))))

Apollo also makes heavy use of databinding. Certain UI elements like Labels expose properties that are 'bindable', such as caption and background. You can define properties in your application and then 'bind' them to elements, and when your values change it automatically updates the appropriate UI element.

Note that the example also shows item templates. You can create a collection of some user-defined struct, and by defining an item template you tell Apollo how to create UI elements from that struct.

Vostok

Vostok is Saturn's Virtual Object System. It allows you to access objects exposed to the virtual file system just like files. Objects can have properties as well as callable functions, providing an RPC mechanism. By opening an object and writing arguments to one of its functions, you can invoke a function call in a separate process and read the results, just by using the filesystem. In the Dsky screenshot above, /system/hardware/cpu is actually a Vostok object, with a nested Id object that has a brand property.

A core feature of Vostok is introspection. By reading a Vostok object, you can discover all of the properties and functions they expose, as well as their types. By reading a function you get the function's signature, ie its input and output types.

/system/hardware/pci/host0/2/0 is the first PCI function on the third device. As you can see from the screenshot, by reading an object itself, you can find out what an object supports and how to interact with it.

Latest Screenshot

This screenshot shows the new Taskbar app that lists open applications and highlights the app with input focus. It also shows the Transcript app which creates structured logs events from the EventSystem, and allows you to filter the logs using a Gemini expression.

Testing

As Saturn is still in its very early stages, there are no releases yet.

Building

Saturn is currently undergoing a major overhaul and thus isn't runnable, but the build system has now been improved to the point where user builds are possible. This section is just for reference for the time being.

Requirements

  • clang >= 5.0
  • svn
  • yasm >= 1.3
  • cmake >= 3.11
  • patch >= 2.7.6
  • automake exactly 1.15
  • autoconf exactly 2.69
  • grub2-mkrescue

Setup

git clone https://github.com/patrick-lafferty/saturn.git

cd saturn

make

Running

Qemu:

make qemu

Bochs:

make bochs

VirtualBox:

make virtualbox

License

Saturn uses the 3-clause BSD license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.