Support for the ESP-IDF framework#452
Conversation
Smoke tested on esp32c3 dev board. I've also tested a similar patch backported to v0.4.9 with much greater functionality including tokio + mio with other patches I've been working on and it's fully working. Closes rust-lang#379
|
I'm not sure how to make the cargo check tests work either, pointers greatly appreciated. |
|
The clippy check that's failing appears to be talking about a file I didn't touch (tests/socket.rs)? Weird... |
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
You can ignore the Clippy warning
src/sys/unix.rs
Outdated
| self.0 & libc::MSG_EOR != 0 | ||
| // TODO: Expose this constant in libc for the ESP-IDF/LwIP framework | ||
| #[cfg(target_os = "espidf")] | ||
| const MSG_EOR: libc::c_int = 8; |
There was a problem hiding this comment.
I don't want to maintain these constants so please add them to libc instead.
There was a problem hiding this comment.
I think we might have alternatives here, let me do a little digging and get back to you with options.
There was a problem hiding this comment.
Oops yeah we can follow redox's example here and just conditionally remove the feature. I'll work on that soon and update. Thanks for the review!
src/sys/unix.rs
Outdated
| pub(crate) use libc::SO_OOBINLINE; | ||
| // TODO: Expose in libc for ESP-IDF/LwIP | ||
| #[cfg(target_os = "espidf")] | ||
| pub(crate) const MSG_TRUNC: libc::c_int = 4; |
There was a problem hiding this comment.
I don't want to maintain these constants so please add them to libc instead.
|
Much better, should be good to go now. |
Not sure how this got missed in rust-lang#452, it was definitely compiling before. Properly closes rust-lang#379.
This was missed in rust-lang#452 because I wasn't testing with feature="all" enabled for my small socket2 test. For the full tokio integration I was using v0.4.x which didn't need this fix. Properly closes rust-lang#379.
Smoke tested on esp32c3 dev board. I've also tested a similar patch backported to v0.4.9 with much greater functionality including tokio + mio with other patches I've been working on and it's fully working.
Closes #379