Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yea when it's usable to people other then me I'll open source it. But so far it's FreeBSD only and I want to get Linux and MacOS support going as well.


You're using inline assembly for syscalls on FreeBSD? My recollection when I last looked into it was that FreeBSD only defined syscalls as C function calls, and did not have a stable ABI at the assembly level.

(I was looking into it because I was trying to do system calls without having a stack page mapped as part of an assembly sandbox).


The majority of system calls are going through the syscall crate, but system calls not yet supported by the syscall crate are being called with assembly directly. However going forward I plan on just updating the syscall crate so it supports newer system calls and make a pr into the syscall repo, instead of manually calling system calls with assembly.


I believe you’ll have to fork the crate, the owner of it no longer programs in Rust.

They may also be willing to hand it over to you, I don’t know.


Any reason you can't use libc::syscall?


While this is true (Windows is another example), that doesn't stop people from doing this. It's how Go works most of the time, for example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: