Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS abstraction layer #229

Open
SamTebbs33 opened this issue Aug 29, 2020 · 2 comments
Open

OS abstraction layer #229

SamTebbs33 opened this issue Aug 29, 2020 · 2 comments
Labels
arch: none Affects common code across architectures arch: x86 Affects the x86 port enhancement New feature or request

Comments

@SamTebbs33
Copy link
Collaborator

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 SamTebbs33 added enhancement New feature or request arch: x86 Affects the x86 port arch: none Affects common code across architectures labels Aug 29, 2020
@SamTebbs33 SamTebbs33 added this to the v0.3 milestone Aug 29, 2020
@SamTebbs33 SamTebbs33 removed this from the v0.3 milestone Nov 23, 2020
@faraazahmad
Copy link

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

@SamTebbs33
Copy link
Collaborator Author

SamTebbs33 commented Jan 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch: none Affects common code across architectures arch: x86 Affects the x86 port enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants