-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Libcore: move "io" to libcore #1373
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
Comments
Once this is moved, we should re-export some "io"-function in "core.rs" |
I disagree. There are various approaches to doing I/O, and hard-wiring one into the core library is probably now what we want. |
As i understood #1096, one goal of libcore was to provide a prelude so that you can write
instead of
My assumption is that in the end you are going to do any kind of filehandle based I/O in any case. If my assumption is correct, and we don't move "io" to libcore, libcore would never be used without libstd. |
I am in favour of io:: in libcore. We may tweak the interface, and/or add a richer aio one (either in core or std), but that's true of any module we're considering. I think at least simple, stdio-style synchronous IO is fair by the third (and possibly second) criteria for libcore. Just about every nontrivial program does IO. It's part of the interface exposed by even the narrowest posix-y narrowings of libc's surface, and we even expose bits through our runtime. I think it's appropriate. |
I would not go beyond having stdio support and required generic interfaces in core to keep in line with our goal of keeping it small. I could also quite live with keeping io in its own lib atop core but separate from the rest of std if both should turn out big enough to justify this. An argument against having io in core would be the availability of the log statement which really is enough to get going with any minimal software that only depends on core. |
…lang#1638. - Move io, run and rand to core. - Remove incorrect ctypes module (use libc). - Remove os-specific modules for os and fs. - Split fs between core::path and core::os.
Benchmark clif release builds with ./y.rs bench
In libcore-land we we can perform calculations and string operations, but we need to discard them eventually, because there are no means to exchange them with the world.
Please move the module "io" to libcore.
The text was updated successfully, but these errors were encountered: