Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Nat Pryce
I'm writing for the Raspberry Pi, so cross-compiling to ARM Linux. --Nat www.natpryce.com On 15 Jul 2014, at 00:18, Ilya Dmitrichenko wrote: Are you working on a project targeting MCUs or Linux? If MCUs, I'd strongly encourage you to join the efforts on Zinc (http://Zinc.rs)! On 14 Jul 2014 23

Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Ilya Dmitrichenko
Are you working on a project targeting MCUs or Linux? If MCUs, I'd strongly encourage you to join the efforts on Zinc (http://Zinc.rs)! On 14 Jul 2014 23:15, "Nat Pryce" wrote: > I'm currently using the native API to implement new I/O abstractions for > GPIO, I2C, etc. But really want to combine

Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Nat Pryce
I'm currently using the native API to implement new I/O abstractions for GPIO, I2C, etc. But really want to combine them with the existing File and socket APIs. I've had to copy code from the native runtime library to convert native errors to IoError, which makes me uncomfortable. What's the URL

Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Ilya Dmitrichenko
Nat, I would very much appreciate if you join the discussion on my pull request. There is also a link to the Stack Overflow answer I got earlier, it describes how you can get the file descriptor form a lower layer `libnative` API... On 14 July 2014 22:26, Nat Pryce wrote: > Are there plans to be

Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Nat Pryce
Are there plans to better link the standard I/O APIs and the platform's native I/O? For example, to control devices (on Linux often done by ioctl, which needs a file descriptor), use non-IP protocols (on Linux, different socket families, return a file descriptor), multiplex I/O events, etc. --Nat

Re: [rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Alex Crichton
There is not currently a method of doing so through the `std::io` apis. While possible through the rustuv and native apis, I would discourage manual use of those crates as they have experimental and volatile APIs. You may be interested in https://github.com/rust-lang/rust/pull/15643 which may add

[rust-dev] How to get the file descriptors of standard I/O types?

2014-07-14 Thread Nat Pryce
Hi. I want to use the existing I/O types (files, sockets, etc.) with epoll. Is there an API call to get hold of their file descriptors? --Nat -- http://www.natpryce.com ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/