Code Monkey home page Code Monkey logo

playsys's Introduction

PlaySys

The Playbit System interface

PlaySys defines an OS-like computing platform which can be implemented on a wide range of hosts like Linux, BSD, Web/WASM, macOS and Windows. This is accomplished via two mechanisms:

  1. A syscall for communication between a program and its host play system. This is just a single function call and does not depend on any specific programming language.

  2. The filesystem for accessing resources like graphics surfaces and network connections. This is modeled on top of syscall operations.

Specification: spec.md

Source

  • include/playsys.h C API
  • examples/hello contains an example program
  • backends implementations of the playsys API for host platforms
    • base C implementation of playsys functions on POSIX host's libc
    • wgpu WebGPU implementation for mac, win & linux based on Dawn
    • js JavaScript implementation for web browsers

Building

Building the "hello" example on macOS (>=10.15, x86_64) with WebGPU:

cd path/to/playsys
backends/wgpu/setup.sh
backends/wgpu/build.sh
examples/hello/build.sh -run out/hello_mac_x64

Note: If you're having issues with clang/llvm, install a non-Apple version from for example homebrew: brew install llvm.

Building the "hello" example for web browsers:

TODO

Concept

PlaySys is one step in a three-part strategy to birth a new software platform:

Step 1

PlaySys โ€” a syscall-like API that is the interface betweet a program and the OS/environment. It is how the program percieves and experiences reality. Filesystem acts as an arbitrary extension to a minimal syscall API, which includes an io_uring-like interface. Capability based: e.g. does this system support pointer input? GPU compute? Writable filesystem?
An "OS" from a program's perspective

Step 2

Libraries to make GUI & CLI development easier on top of PlaySys.
The API from an app developer's perspective

Step 3

Implementations of PlaySys:

  • an OS using the Linux kernel providing a window manager
    An "OS" from a user's perspective
  • an implementation for web platform:
    run PlaySys programs in a web browser.
    An "app" from a user's perspective

playsys's People

Contributors

rsms avatar cabralski avatar

Watchers

James Cloos avatar

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.