-
Notifications
You must be signed in to change notification settings - Fork 161
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
Feature request: Document rustix::runtime #1180
Comments
I don't know how I managed to miss |
I missed |
If you generate the documentation with If you'd like something more than that, it would be helpful to say more about your use case, to inform possible solutions here. Are you using |
I would like the documentation on I understand that the parts of the API that are currently undocumented may be subject to change with less notice than the rest of the API, but I think you should have them publicly documented anyway, so that people don't waste time looking for alternative crates and/or trying to write syscall stubs by hand.
The short version is that I need functionality equivalent to (a subset of) Right now the bits of the undocumented API that I need are As a general principle, also, I feel that rustix ought to provide a documented interface to every single system call Linux has. It's fine if the documentation says "This is unsafe even by the normal standards of unsafe code, we haven't figured out how to define anything like a safe wrapper for it, and we don't plan on doing that work anytime soon, but we will change this API when we do get around to it". But if someone needs a particular system call and rustix doesn't document a stub for it, they're not going to give up, they're going to grumble and reach for the inline assembly. |
Thinking about this issue and sunfishcode/eyra#51, I ended up finding it feasible to make origin support stable Rust. So origin 0.21.2 (just released) now works on stable Rust, if you'd like to use that. Looking at root-scaffold, I ended up writing a patch, which I've posted here, which ports it to origin. It's mostly straightforward and should support everything, except for the I also agree that we should ideally move stuff in |
@sunfishcode Gosh, thanks! I have adopted your patch with some tweaking. Maybe I'll actually get around to coding up the thing I wanted to code in the first place! I honored the
I sympathize, but also this project is going to need some weird ioctls :-) ... But rustix lets you write your own ioctl stubs already, so that won't actually be a problem. I feel like "a documented interface for every non-obsoleted top-level syscall" ("top-level" defined by what gets a |
I misclicked on "close with comment" instead of just "comment", apologies for the noise. |
rustix does not currently expose the
_exit
system call as far as I can tell. This would be useful in at least two contexts:fork
(which is also missing right now but I trust it's already on your list of things that need to be added)#[no_std]
crates that nonetheless have the kernel available (e.g. the various projects trying to make it possible to write Rust programs that do not use a C library).The text was updated successfully, but these errors were encountered: