Comment

Comment by tkinom

Does rust use getaddrinfo()?

grep -irn getaddrinfo .

./src/libstd/sys/common/net.rs:123: try!(cvt_gai(c::getaddrinfo(c_host.as_ptr(), ptr::null(), ptr::null(),

./src/libstd/sys/windows/c.rs:1235: pub fn getaddrinfo(node: const c_char, service: const c_char,

./src/libstd/sys/windows/net.rs:69:/// Provides the functionality of `cvt` for the return values of `getaddrinfo`

How many places doesn't rust source code use C structures or call C APIs?

In the rust source tree, run this:

grep -irn '[^a-zA-Z0-9]c::' . |wc

    615    3143   56000
grep -irn 'extern "C"' . |wc

    279    1719   23448
parent tkinom 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton