-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add bindings for LibC::Statfs #6056
Conversation
What's the catch with having these bindings definitions without using them anywhere? |
Users can use them directly. Crystal has |
|
How about moving |
I think we should do like rust did (https://github.com/rust-lang/libc), creating https://github.com/crystal-lang/libc . |
we should probably make the infrastructure for automatically generating those bindings repeatable too (i.e. automate downloading the required libc headers to generate the libc bindings from) as well. Then we just have one bindgen config for the std and one for the libc project. |
| The LibC bindings are not a public or documented feature of the compiler. LibC bindings is a part/feature of the compiler?! It doesn't has to. Docs are also always good. At least, is it possible to have libc related stuff on its repository (submodule, subtree or shard)? |
At the end, I will be happy with any solution that permits us to complete the |
That was a typo, sorry, I meant to say part of the stdlib.
Not true, the headers contain all the information required. If this wasn't the case, then C wouldn't be able to use libc either. |
I've changed the title, let's shift the talk to #6053. |
This work is based on
ztypes
of https://golang.org/src/syscall.This is the first time I do this, not sure what do choose between
Long
,Int
andInt32
.I haven't indeed tested on all platforms, but works at least on
x86_64-linux-musl
.Fix #6053