pluto icon indicating copy to clipboard operation
pluto copied to clipboard

OS abstraction layer

Open SamTebbs33 opened this issue 5 years ago • 2 comments

To be able to write Zig programs to be run by the kernel, an OS abstraction layer (https://ziglang.org/download/0.6.0/release-notes.html#Bring-Your-Own-OS-Abstraction-Layer) is required to allow the stdlib to interface with the kernel.

SamTebbs33 avatar Aug 29 '20 14:08 SamTebbs33

I'm a noob so sorry in advance for this question. But what would be required to build the OS abstraction layer?

I'm interested in working on a shell, so I want to help out on this issue

faraazahmad avatar Jan 17 '21 20:01 faraazahmad

The OS abstraction layer would need to provide and interface for common operations, like opening files, executing programs etc. via syscalls into the kernel. We could use linux OS layer as inspiration, but it is a very complex file so a good approach to making our own layer would be to compile a program that does something very specific, such as opening a file, and seeing what the compiler tells us is missing from the abstraction layer.

Feel free to have a go! You may run into a dead-end quite soon though because we haven't merged any syscalls into master yet so there isn't too much the layer could actually do at the moment.

Once I fix the failing tests in #273 we'll be able to execute compiled programs, and then we can really get going with some cool stuff.

SamTebbs33 avatar Jan 19 '21 18:01 SamTebbs33