wllenyj opened a new issue, #19360:
URL: https://github.com/apache/nuttx/issues/19360

   ### Is your feature request related to a problem? Please describe.
   
   Currently the nuttx rust app is not compiled, when using the tokio net 
feature.
   So I added the interrelated definitions for Nuttx target in `libc` and other 
crates as follows.
   
   https://github.com/rust-lang/libc/pull/5258
   https://github.com/tokio-rs/tokio/pull/8259
   https://github.com/lambda-fairy/rust-errno/pull/129
   https://github.com/tokio-rs/mio/pull/1966
   https://github.com/rust-lang/socket2/pull/663
   
   However, I'm worried some details might be incorrect, so I'd appreciate it 
if the NuttX maintainers could review this together. Thank you.
   
   
   
   ### Describe the solution you'd like
   
   1. Enabled keepalive in socket2. 
   2. Disabled unsupported capabilities.
       These flags are not supported in Nuttx target.
       SO_REUSEPORT
       IP_HDRINCL
       IP_RECVTOS
       IPV6_RECVTCLASS
       IPV6_ADD_MEMBERSHIP
       IPV6_DROP_MEMBERSHIP
   3. Used `poll` as the selector instead of `epoll`. because the epoll_event 
structure is defined differently from the linux_like. Therefore, additional 
support may be needed; for now, let's get tokio working. Supporting epoll is 
the final solution. It may open other pr to progress epoll support.
   4. Linked `errno` crate to use `__errno` symbol.
   5. Disabled `reuseport` in tokio.
   6. Use `impl_noproc` to handle `get_peer_cred`,in tokio for working. In 
future, may be needed coding to support.
   7. Added some definitions in libc.
   
       
   
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to