Re:Rewrite Everything in Rust
by na85 on Monday February 22, 2016 @10:15PM
(#11156224)
Is there a "glibrust" or equivalent standard library for Rust, yet?
[ Parent
| on HN ]
Re:Rewrite Everything in Rust
by thinkpad20 on Monday February 22, 2016 @10:25PM
(#11156277)
Rust of course has a standard library[0] and it includes a libc, but (I might be wrong here) I think the libc portion is FFI into glibc or similar. I think the stuff written in rust is considerably more high-level, focusing more on data structures, concurrency, string manipulation, etc.
Re:Rewrite Everything in Rust
by steveklabnik on Monday February 22, 2016 @10:55PM
(#11156405)
We use glibc by default but provide MUSL builds for some platforms as well.
I guess what I'm asking is if the syscall wrappers are in rust or if rust just calls glibc wrappers.
There is the library 'libc' which is a collection of interfaces to (g)libc functions together with the necessary constants and structs [1].
There is the library 'nix-rust' [2], which aims to provide a wrapper of 'libc' in idomatic Rust.
Unlike 'libc', 'nix-rust' does not have a consistent code quality and organization yet. However, Both are missing various bindings for various platforms.
[1] https://github.com/rust-lang/libc [2] https://github.com/nix-rust/nix
Re:Rewrite Everything in Rust
by CyberDildonics on Monday February 22, 2016 @10:26PM
(#11156282)
rust relies heavily on libc as far as I know
Re:Rewrite Everything in Rust
by steveklabnik on Monday February 22, 2016 @10:56PM
(#11156410)
Some of the standard library does, but the core language does not. (libcore does not, and we've resisted putting libc specific things in core)
Re:Rewrite Everything in Rust
by Manishearth on Tuesday February 23, 2016 @04:00AM
(#11157516)
No, not heavily. libstd depends on it some (we allow both glibc and musl libcs).
libcore (the baremetal library) and the language don't need libc at all.