@briansmith
IMO, there is some functionality in libstd that shouldn’t be in libstd
Right, but it’s going to hard or perhaps impossible to remove stuff from std because of backward compatibility. We could add Cargo features to std that would let you remove some functionality but that customized std will not work with every crate on crates.io due to API / functionality differences and that’s a big downside.
I also expect that this project will help identify any libstd APIs that are unnecessarily worse because they’ve been optimized for implementations based on libc.
Like io::Error::last_os_error? Given Rust’s Result based error handling, I don’t see much point in implementing errno in steed, except, well, to implement Error::last_os_error.
@ruudva
Does it need to rival libc in performance?
Not at the beginning. Let’s focus on achieving feature parity / API compatibilty with std first and then focus on optimization.
Getting a fast memchr for example, is going to be hard without having stabilised simd.
We can use unstable stuff in steed though. Or rather, we have to use unstable features anyway. For example, we need asm! to do the syscalls.
@leonardo
I didn’t say it’s or would be faster though. Just that inlining would be better. More optimization doesn’t always result in faster code, e.g. -O2 being faster than -O3 in some cases.
I see potential for smaller / faster binaries though, like the very small statically linked hello world (see examples in the repo):
$ size hello
text data bss dec hex filename
131 0 0 131 83 hello