You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can the standard library be designed to minimise use of syscalls? It would be great if the stdlib can be bootstrapped by defining a few primitives. Making the runtime easily bootstrapable/generic would be really nice since pretty much every other programming language requires rewriting the entire standard library when doing OS development due to the lack of malloc, stdio etc. Imagine how much easier OS Dev would be if there's a "zig runtime function stubs" file with perhaps twenty primitives. Once the user fills them out, they would be able to do OS Dev with full access to the stdlib
The text was updated successfully, but these errors were encountered:
One thing I want to note is that you can use any of the standard library when compiling for the freestanding target, and you'll get a compile error if you accidentally depend on code that had to make a syscall. If you don't get a compile error, then your code does not depend on an OS syscall.
I don't really understand what this issue is calling for. The standard library already tries to be efficient, and only depends on the OS if it has to. Feel free to re-open with further explanation.
@Immortalin says from #322 (comment) :
Can the standard library be designed to minimise use of syscalls? It would be great if the stdlib can be bootstrapped by defining a few primitives. Making the runtime easily bootstrapable/generic would be really nice since pretty much every other programming language requires rewriting the entire standard library when doing OS development due to the lack of malloc, stdio etc. Imagine how much easier OS Dev would be if there's a "zig runtime function stubs" file with perhaps twenty primitives. Once the user fills them out, they would be able to do OS Dev with full access to the stdlib
The text was updated successfully, but these errors were encountered: